Yes/No in Access query

Score
0
Vote Up
September 2, 2010 at 17:40:56 Pacific
Specs: Windows XP

I have yes/no in one access table field. run query and can get records with yes, or No by putting =yes, or =no in the query criterai. Now the question is, if I put a ? mark in the query criteria and run query and then put Yes, or No in the Enter Parameter Value window it doesn't work. any ideasd

Reply ↓  Report •


#1
Vote Down
Score
0
Vote Up
September 3, 2010 at 06:27:31 Pacific

Do you want it to prompt you for a Yes/No Parameter every time you run the query? If so, in your Criteria row of your Yes/No column, enter "= [Enter Yes or No]

Reply ↓  Report •

#2
Vote Down
Score
0
Vote Up
September 3, 2010 at 17:43:44 Pacific

I didn't catch my mistake before... It should be "= [Enter Yes or No]" without the "" at the beginning and the end. Sorry about that. I hope that answers your question!

Reply ↓  Report •

#3
Vote Down
Score
2
Vote Up
September 4, 2010 at 07:12:56 Pacific

thanks for your reply, I found the solution as follows:
- go to query design view
- click on Parameters top right corner of the design window
-type parameter name and then type Yes/No for the data type
-type the same parameter name in the query criteria under the appropriate field
- run query then typing either yes, or no will now work ok

cheers


Reply ↓  Report •

#4
Vote Down
Score
0
Vote Up
September 4, 2010 at 11:54:36 Pacific

I'm glad you figured it out. Both ways work, just a different way of doing it! Good luck with your database!

Reply ↓  Report •

Reply to Message Icon Start New Discussion
Related Posts

« Multiple If Statements in... repeating a vba code in e... »

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.

Ask the Community!
Describe your Problem
Example: Hard Drive Not Detected on My PC