Error Message

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
 
D

Diane Jamail

I suggest you use VBA to write an event procedure to test
for no records found.
Diane
 
L

Larry Daugherty

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
.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top