Expression? Return 1 of many

TimE

Registered User.
Local time
Yesterday, 20:45
Joined
May 17, 2005
Messages
55
When running a query, I want to hide duplicates records for a given field. PO# will have many duplicates, depending on how many part numbers were order on the same PO#. Other unique fields are not displayed. Can an expression help with this? If not, how do I go about hiding them in a query?

Current Query results:

DATE PO#

08/18/2005 ABCD
08/18/2005 ABCD
08/18/2005 ABCD
08/18/2005 ABCD

Desired Query results:

08/18/2005 ABCD


Thanks in advance with any help!
 
Use a totals query to group the data.

Select OrderDate, PartNumber, Count(*) as PartsOrdered
From YourTable
Group by OrderDate, PartNumber;
 
What is the table structure here? Are the P.O. numbers in the same table as the parts ordered? They should be in a seperate table and linked in a one-to-many relationship. If this were the case you could easily query just the P.O. numbers.

As for now, add that as the only field and use the group by option. You can get it by clicking the TOTALS toolbar item. Looks like a sideways M.
 

Users who are viewing this thread

Back
Top Bottom