yes/no options in form and query (1 Viewer)

ankrumc

Registered User.
Local time
Yesterday, 19:29
Joined
Feb 23, 2009
Messages
42
I have a query that I want to sort through a form to pull up all the records from different check boxes.

For instance I want all the records who have brown eyes (yes/no) and brown hair (yes/no)

I thought I would put a combo box on the form with "yes" and "no" as the two options that can be chosen.

In the query criteria I tried [Forms]![attributes]![hair] and another [Forms]![attributes]![eyes]

And so I'm trying to figure out how to make the form work with the query so that I can choose which options to filter for a report.

Also, I'd love to be able to use the a similar style to search for something in the record like *basketball, by using a textbox in the form. So the textbox I write basketball, which I would want to hit this criteria in the query Like "*[Forms]![attributes]![interests]*"

I having a feeling my problem is related.

Thanks!
 
Last edited:

honda882000

Registered User.
Local time
Yesterday, 20:29
Joined
Apr 16, 2009
Messages
62
The problem is probably since the text box is feeding the query a string value, when the actual table value for Yes/No is stored as a boolean, even though Access calls it Yes/No. Try changing the "Format" to "Yes/No" under field properties of your text box/combo box in your form (select field, then go to View -> Properties menu).

Hope this helps.
 
Last edited:

Users who are viewing this thread

Top Bottom