Form for a query

Shepps

Registered User.
Local time
Today, 20:03
Joined
Mar 20, 2004
Messages
14
I currently have a form with 2 text boxes, these text boxes are linked to a query. If i enter search criteria in both boxes, and a record matches that criteria then it works fine, however if i leave a box blank it doesn't find anything. It because its looking for a record with the first detials, but a blank 2nd set of details.

What i would like to know is there a way in the query to ignore blank fields? So if i type in Staff Name, and not their grade, it will work, or vice versa.

Thanks
 
Found another solution.

Like "*" & [Forms]![search]![List22] & "*, seems to work fine. If all the fields are left blank, it displays all the records in the table, but thats what i want :D

Cheers for your help any way guys :)
 
Argg need to ask another question now.

I need a combo box and a text field to be linked, so that say if CPR is selected, and a date entered, the query will search the database for the CPR field with that date.

Ne ideas?
 
Can you not base the query on those two fields?
 

Users who are viewing this thread

Back
Top Bottom