Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Count Unique Records

Status
Not open for further replies.

kramerica

Technical User
Jun 19, 2001
74
US
My Query in Access 97 is designed to count records. If I change the query parameter to "Unique" = Yes I get the same results in the query. If I remove the count field it returns the correct number of records, yet when I add the count field it gives the total number of records in the table?! I am open to any solution. I am using the code to generate charts and graphs, the counting of unique records is just an interim step an I was using a query to do it.. Is there a way to do this with VB Code?
 
Set up a group by query to return the unique records then in VB you can use a DCount() function on that query to capture the # of records. Maq [americanflag]
<insert witty signature here>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top