Just to clarify, it sounds like you have multiple rows in your table, with
data like the example.
So if you look for a code of "a1" AND "a2", you'll never find it! That's
because you'll only ever have ONE code in the code field (as it should be).
What is it about "geff" that makes excluding "fred" important. Is it that
"geff" has more than one record? If that's the case, run a query that
returns all the names of folks with more than one record. Then join that
query back to the table and find all the folks who are NOT on the list of
"more than one record".
By the way, if your database has more than one "fred", are they the same
person more than once, or two (or more) different people?
Regards
Jeff Boyce
Microsoft Office/Access MVP
"doublezer00" <(E-Mail Removed)> wrote in message
news:3869782D-17BB-4E82-A67E-(E-Mail Removed)...
> Hiya,
>
> wonder if anyone can help me get a pay rise
>
> got a database say:
>
> name code
> geff a1
> geff a2
> fred a1
>
>
> in query i used Or for "a1" Or "a2" and it brings up codes a1 or a2, if i
> use And it brings back nothing. i want to query multiple codes and reult
> only
> all codes contained. so if query is a1 and a2 i would not want fred to be
> displayed. there are thousands of codes and hundreds of names, names are
> on a
> seperate table for reference and multiple names are used in the main
> matrix.
>
> please help, ive tried for three days and got nuthin!
> please email me, i need some experienced contacts.
>
> be well