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

Parameter for "yes/no" field will not work 1

Status
Not open for further replies.

MariaL

Instructor
Jun 23, 2003
50
US
Hello everyone. I have a query which pulls a field that has a data type set to "Yes/No". I have set the following parameter in the query design:
Like [ELIGIBLE FOR REHIRE/YES OR NO] & "*"
I want to be able to pull yes, no or all.
Does anyone know why this would not work?
Thank you for your time and help!

 
Yes, same problem. I tried true/false, -1/1, yes/no. It still pulls all records. Please let me know if you think of anything else. I really appreciate your response.

 
Ran this on my own db and it worked, but i couldn't get it to work with a parameter.

SELECT * FROM tblTrainer
WHERE Current = Yes;

It's go to be a datatype issue, but i'm not sure how to get around it.

Leigh Moore
LJM Analysis Ltd
 
You have been great Leigh. It works fine without prompts. If I put yes in criteria it will pull yes. same thing with no. But without using a parameter on this field, i will have to have tree queries to get the needed result at the time. AS of now, I'm going to assume that you can't use parameters with a field set to datatype "Yes/No". Please keep me in mind if you find anything out in regards to this issue. Thank you!

 
That was a good question...got me thinking...and after a bit I came up with this...give it a try:

Like IIf([YesOrNo]="Yes",True,IIf([YesOrNo]="No",False)) & "*"

Hope that helps.

Kevin
 
You get a star from me as well! I appreciate your help! Have a great day everyone!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top