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

query if any value = x

Status
Not open for further replies.

rubberhead10

Technical User
Sep 13, 2006
49
0
0
US
So I am having brain fade or something and need some help.

I have a access database and one of the tables has many fields that are equal to either pass or fail. I need a query that will look at the table and if any field equals "Fail" it will populate the entire record.....I tried putting "Fail" as the criteria for each field but that did not work......thanks in advance for any help
 
I'll leave to others to discuss design issues. To answer your question, if you are using the query grid, you need to set up the fail as an OR criteria. Sounds like you may have set up as AND. To do an OR on the grid, you would need to diagonal the word "Fail". Something like below. Hopefully, example will render ok on viewing.

[PRE]Field1 Field2 Field3
"Fail"
"Fail"
"Fail"
[/PRE]
 
Regarding sxschech's "design issues" comment, I would suggest you evaluate your table structure. It seems to be unnormalized and I expect column/field names actually contain data values. I could be wrong and would be willing to discuss this further but perhaps forum700 is a better place to post questions.

Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top