Query to exclude simular items

Robbie1974

New member
Local time
Today, 18:57
Joined
Mar 31, 2005
Messages
8
I have the following list:

What i want to archieve is to exclude the records that have a DC* value in Document No_, but also the other records with the same Item No_.

Is this possible? I tried with a total query but cannot archieve what i want. Do i need VBA to archieve this?

Posting Date Item No_ Document No_
15/06/2010 2009000001 DC000817
15/06/2010 2009000001 DC000820
15/06/2010 2009000002 131557
15/06/2010 2009000002 DC000817
15/06/2010 2009000002 DC000820
15/06/2010 2009000003 DC000817
15/06/2010 2009000003 DC000820
15/06/2010 2009000004 DC000820
15/06/2010 2009000004 131564
16/06/2010 2009000004 131796
15/06/2010 2009000004 DC000817
14/05/2010 2009000005 S001-P00102-2500
15/06/2010 2009000005 DC000817
15/06/2010 2009000005 DC000820
15/06/2010 2009000006 DC000820
15/06/2010 2009000006 DC000817
12/06/2010 2009000007 S001-P00103-2199
15/06/2010 2009000007 DC000817
15/06/2010 2009000007 DC000820
18/06/2010 2009000008 132044
15/06/2010 2009000008 DC000817
15/06/2010 2009000008 DC000820
 
You should be able to pick out the records with the DC prefix by using Like "DC*" as a criteria, you should then be able to use the results of this query in a find matching query by first stripping out the DC prefix from the result.
 
To add to John's answer, to exlude use criteria Not Like "dc*"

JR
 

Users who are viewing this thread

Back
Top Bottom