PDA

View Full Version : Counting in Reports (MS Access)



sreyes17
07-09-2008, 12:42 PM
I have a report with a Diagnosis Codes field which lists no change or change code for each account number.

I want to know how many "Change Code" are in the Diagnosis Code field.

How do I count that?

I thought it was =Count([Diagnosis Codes] = "Change Code")

But its not working. Am I doing something wrong?

CreganTur
07-09-2008, 12:58 PM
You're almost right- you need to use the DCount function.

DCount("[Diagnosis Codes] = 'Change Code'", "TableName")

You need to replace TableName with the name of the table (or query) that you're looking at. The quotation marks are important, btw.

HTH