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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

paramater query problem

Status
Not open for further replies.

tizwaz

Technical User
Aug 8, 2002
437
GB
I have a simple query with a yes or no field. when I type yes or no in the criteria it returns the data correctly. However when i put a paramater in ie [enter yes or no] and then type either yes or no I get an error saying it is incorrect or too complex to evaluate.

Actually I would like to be able to type yes, no or leave blank. Can anyone tell me how to do this?
 
What Data Type is that field? If Yes/No then
Try True or False instead of Yes or No

________________________________________________________
Zameer Abdulla
Help to find Missing people
Do not cut down the tree that gives you shade.
 
Data type is yes/no. The query works if I type yes or no or true or false but when I try and type either in the paramater box it gives the error
 

I've tried
IIf([enter yes or no]="yes",-1,0)
which works if I type yes or no in the paramater. Now all I need is to return all records if the paramater box is left blank
 
Its ok I've answered my own question
IIf([enter yes or no or leave blank for all]="yes",-1,0) Or Like [enter yes or no or leave blank for all] Is Null

seems to work
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top