Need a query to identify duplicate customer orders

When you removed Group By, what did you change it to? It should be Expression, as should all calculated fields and domain aggregates that aren't using the query's built in Sum, Max, etc.

Also, when you use strings as criteria, as in
Code:
MinDate: DMin("[OrderDate]","Items Ordered","( [CustomerID]=" & CStr([CustomerID]) & " ) AND _ 
" & "( [SKU] = " & CStr([SKU]) & ")")
they need to be enclosed as strings, as in
Code:
MinDate: DMin("[OrderDate]","Items Ordered","( [CustomerID]='" & CStr([CustomerID]) & "' ) AND _ 
" & "( [SKU] = '" & CStr([SKU]) & "')")
(note single quotes ' inside the double quotes " surrounding your string criteria).
 

Users who are viewing this thread

Back
Top Bottom