validation for queries

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am setting up a parameter query. I need to know if there is a way to put up
a error message if the input by the operator is not valid. For example if the
users has to search for a name and the name is not in the database a message
pops up and says wrong name entered
 
No. Query parameters are very limited in their usefulness.

Queries are not really intended to be an end-user interface. Use a form
instead. In a form, you can use an unbound text box where the user can enter
the name to find, and you can then use the AfterUpdate event of the text box
to find the record with the first match, or filter the form to show all
matches, or notify the user if there is no match.

If there are no more than a few thousand names, you can even use a combo to
move to the exact person you want. There is a combo wizard to help do that,
or better code in this link:
Using a Combo Box to Find Records
at:
http://allenbrowne.com/ser-03.html

None of that functionality is available for parameters in queries.
 
Back
Top