Error Message

  • Thread starter Thread starter Steph
  • Start date Start date
S

Steph

I have a query set up to look up records that contain a
certain value in a text box (txtSortByIONumb) on a form
(SearchBy). I have the following expression under the
query criteria:

Like Nz([Forms]![SearchBy]![txtSortByIONumb],"*")

If a user enters a value in the text box that is not in
the database, how do I create an error message to pop up
that says "This value does not exist. Please enter
another value."

Thanks,

Steph
 
I suggest you use VBA to write an event procedure to test
for no records found.
Diane
 
You might base a combobox on your query. Leave Limit to List True. If the
users enter values that aren't in the list they'll get a message from Access
to the effect that they must choose a value in the list.

hth
--
-Larry-
--

Diane Jamail said:
I suggest you use VBA to write an event procedure to test
for no records found.
Diane
-----Original Message-----
I have a query set up to look up records that contain a
certain value in a text box (txtSortByIONumb) on a form
(SearchBy). I have the following expression under the
query criteria:

Like Nz([Forms]![SearchBy]![txtSortByIONumb],"*")

If a user enters a value in the text box that is not in
the database, how do I create an error message to pop up
that says "This value does not exist. Please enter
another value."

Thanks,

Steph
.
 
Back
Top