Feb 7 2006, 04:00 PM
I have a query that counts how many records are within a group. I need to place in the criteria that I want even numbers of counts displayed. How do I do this? Am I limited to the MOD([MyField],2)=0? If so I am not sure how to place this in the criteria of the query. Please help.
Feb 7 2006, 04:05 PM
Add a column to your query:
Set the Criteria for that column to 0
Feb 7 2006, 04:11 PM
I got it to work like this:
SELECT Count(Orders.OrderID) AS CountOfOrderID, Orders.CustomerID
GROUP BY Orders.CustomerID
Having Count(Orders.OrderID) Mod 2 = 0;
Open a new query in Design View. Select NO TABLES. Click the SQL button at the left end of the Toolbar. Copy and paste this into that window. Switch back to Design View.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here