Stop Null in Parameter Query

gmit

Registered User.
Local time
Today, 06:54
Joined
Jan 27, 2004
Messages
23
I have a parameter query that uses [Enter Name] for user input. If a user enters a name and presses ok the query brings up the required results. If user presses ok without entering anything in box I get wrong results. Anyone know how I can stop users from just pressing ok without entering name?
 
Your best bet is to forget the parameter method and use a textbox on a form to let the user enter what thay want. The command button can then verify that there is data and inform if 0 results are found rather than open an empty query, and can validate the search data. A combobox, if the list is known, is even better.

You can always reference the form as criteria, like so:

[Forms]![MyForm]![MyControl]
 
I managed to get some code in the after update of a text box to run SQL code to get the required results. Struggled a bit with the SQL code as I'm unfamiliar with it but I agree the results are better. Thanks.
 

Users who are viewing this thread

Back
Top Bottom