Susanne,
If I understand you correctly, there was probably no need to do this via
a query based on a query. You can have multiple criteria in the one
query, so in the query design grid, you can just keep adding one below
the other, so each in interpreted as another "OR".
A "Group By query" (this is called a Totals Query) is not apprlicable in
this instance. If you need to handle duplicated records returned in the
query data set, you can use the DISTINCT keyword in the SQL. To do this
from the design view of the query, right-click anywhere on the
background of the upper panel of the query design window, select
'Properties' from the pop-up menu, and then set the Unique Values
property to Yes.
The way you expressed "Not like 'DO' and not like 'PEND' and not like
'DUP'", makes me thing you entered the criteria using the Like keyword.
This is not really appropriate (though will probably work ok). Like
is used when you want to use a wildcard ("*" or "?") in the criteria.
Probably this criteria should have been written like this...
<>"DO" And <>"PEND" And <>"DUP"
or...
Not In("DO","PEND","DUP")
Best wishes for the rest of your project.
--
Steve Schapel, Microsoft Access MVP
Replying to Karl & Steve:
All of the codes are Network Codes. Each provider has at least one Network
Code. Some have as many as a dozen. What I figured out to do was to do two
queries. In the first query I used WHERE and put "WRKCMP" in Criteria and
then put Like "PPO" and not like "NOWC" in the Or Criteria. I needed to find
providers that have either ["WRKCMP"] or ["PPO" but don't have "NOWC"]. Then
I created a second query on the first query using WHERE again and putting Not
like "DO" and not like "PEND" and not like "DUP" in Criteria.
I felt that a Group By query was necessary for what I needed. I want to pull
each unique Provider only once as not get duplicates caused by them having
multiple Network Codes that I was looking for. Some could have more than one
"PPO" Network Code while others can have both a "PPO" and a "WRKCMP".
Thank you both for answering. This is truly a wonderful website that helps
me out a lot!