E
el zorro
I'm using this code on a form (SelectionForm) to open
another form (TheForm)to display a specific record:
stDocName = "TheForm"
stLinkCriteria = "[RecordNumber]=" & Me![Text9]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Pretty basic. Text9 is the box on SelectionForm were the
user enters the record number.
Works great if the user inputs a real Record Number.
However, when the user enters a number for which there is
no matching record, TheForm opens at a new, blank record.
Strange-- I thought there would be an error message of
some kind.
I would rather have the user notified that she needs to
input a correct number if there is no match. How can I do
this? As always-- y'all are great!
another form (TheForm)to display a specific record:
stDocName = "TheForm"
stLinkCriteria = "[RecordNumber]=" & Me![Text9]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Pretty basic. Text9 is the box on SelectionForm were the
user enters the record number.
Works great if the user inputs a real Record Number.
However, when the user enters a number for which there is
no matching record, TheForm opens at a new, blank record.
Strange-- I thought there would be an error message of
some kind.
I would rather have the user notified that she needs to
input a correct number if there is no match. How can I do
this? As always-- y'all are great!