Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple query criteria entered by Form problems

Status
Not open for further replies.

jimbo62

Technical User
Oct 19, 2002
43
US
I have an unbound form which references multiple criteria n a query. The problem is when i do not enter any of the date criteria("between" Style) and enter information in any of the other criteria the query brings back 0 records. I tried to put in an "or" statement to specify the year and all records from that year come back, no specifics. my goal is to allow the user to enter only the criteria they have or need and run the query. Is there a way to ignore the criteria except whrer the user enters information? Any help would be appreciated.

Thanks,

Jim
 
If I've understood the problem right then I think something similar to the following, placed in the query criteria, should work:

IIf(IsNull([input box]),Like"*",[input box])

Sharon
 
That did not work. Maybe I am missing something any other ideas? Query returns nulls unless I enter something valid into one of the other fields.

Thanks,
Jim [sad]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top