Problem with Filter Query

hardrock

Registered User.
Local time
Today, 23:31
Joined
Apr 5, 2007
Messages
166
I am trying to get my filter query to work properly, but its not quite there yet!

Here's the Query Criteria

Like "*" & [forms]![myform].[Grp] & "*" And Like "*" & [forms]![myform].[Grp2] & "*" And <>"MICK"

Basically i want to have my query filter records with a value in Grp, Grp2 or a combination of both, whilst always filtering out MICK

The options for Grp and Grp2 are Steve, Mark, Shaz ,Bev

The query works with one name in either Grp or Grp2, but if Grp and Grp2 are filled, i get no output whatsoever! Any ideas? Thanks
 
Put the crieria on separate lines so you get an OR not AND.

Like "*" & [forms]![myform].[Grp] & "*" And <>"MICK"
OR Like "*" & [forms]![myform].[Grp2] & "*" And <>"MICK"
 
re:

Thanks Neil, and i totally understand your logic. When i tried it and it worked for some combinations, but it also behaves weird, for other combinations. The query sometimes shows the whole table....:confused: any ideas?
 
Bit short of information! Knowing how your table is structured, plus knowing what the whole query is would be a good start!
 

Users who are viewing this thread

Back
Top Bottom