Multiple query fields of a form

josephbupe

Registered User.
Local time
Today, 21:30
Joined
Jan 31, 2008
Messages
247
Hello everyone!

I am new to MS Access. I am creating a small database for motor vehicle clearance. I have a SEARCH form where i want to put the fields for searching query table:

VEHICLE MAKE:

REF No.:

BEGIN DATE:
END DATE:

I need it in such a way that even when only one of the above fields is supplied with data it should still return correct data from the query table.

For dates (BEGIN DATE, END DATE) i tried: Between [forms]![search]![begin date] and [forms]![search]![end date]

This worked well when placed alone of the SEARCH form. But when i added more fields (VEHICLE MAKE, REF No.) the query returned nothing but a blank query table.

How can i possibly resolve this.

I will appreciated.
 
I found if I used too many of these in a query it started to return incorrect data.
You would be bettter using VBA to query form data entered onto the form.

Although you may be able to use the 'Like' criteria at the beginning of what you currently have.:)
 
Plenty of examples in these forums if you do a search. As pl456 says, the LIKE operator is they key to this.
 
Mulple query text boxes on a form

I found if I used too many of these in a query it started to return incorrect data.
You would be bettter using VBA to query form data entered onto the form.

Although you may be able to use the 'Like' criteria at the beginning of what you currently have.:)



Could you show me how to do it or point me to where i can find a tip on using the VB for this?
 

Users who are viewing this thread

Back
Top Bottom