Good Afternoon,
I need some help with an Access report. I am using Access 2003 with a database in Access 2000 file format. I am also pretty new to coding and have no idea what I’m doing there, so I’m trying to keep it simple if possible.
I am trying to create a report that counts the number of cases by multiple criteria. It is a year end report, so there will be 60 separate counts. I have one table that I am pulling data from that contains several fields including CaseID, Division, FY, ActionCode and Status Code. I want to count the number of cases for a specific year (FY), division (one of two locations), action (one of ten different actions) and status (complete or pending).
I began by creating several queries in order to be able to use Dcount with only one criteria. However, when I got up to 12 separate queries and was only halfway complete, I decided there has to be another way to pull the info out of the one table instead.
This is the function I have in the control source of my unbound text box in the report so far:
=DCount (“[CaseID]”,“tbl2005CaseLog”,“[ActionCode] = ‘PADM’ AND [Division] = ‘G’”)
It gives me an error saying Invalid Syntax, you many have entered an operand without an operator.
If I remove the second criteria and leave it as this, it works just fine:
=DCount("[CaseID]","tbl2005CaseLog","[ActionCode] = 'PADM'")
Can anyone explain to me how to add more than one criteria to a Dcount? I would ideally like to use 3-4 criteria.
Thanks so much for the help.
Jaimee
I need some help with an Access report. I am using Access 2003 with a database in Access 2000 file format. I am also pretty new to coding and have no idea what I’m doing there, so I’m trying to keep it simple if possible.
I am trying to create a report that counts the number of cases by multiple criteria. It is a year end report, so there will be 60 separate counts. I have one table that I am pulling data from that contains several fields including CaseID, Division, FY, ActionCode and Status Code. I want to count the number of cases for a specific year (FY), division (one of two locations), action (one of ten different actions) and status (complete or pending).
I began by creating several queries in order to be able to use Dcount with only one criteria. However, when I got up to 12 separate queries and was only halfway complete, I decided there has to be another way to pull the info out of the one table instead.
This is the function I have in the control source of my unbound text box in the report so far:
=DCount (“[CaseID]”,“tbl2005CaseLog”,“[ActionCode] = ‘PADM’ AND [Division] = ‘G’”)
It gives me an error saying Invalid Syntax, you many have entered an operand without an operator.
If I remove the second criteria and leave it as this, it works just fine:
=DCount("[CaseID]","tbl2005CaseLog","[ActionCode] = 'PADM'")
Can anyone explain to me how to add more than one criteria to a Dcount? I would ideally like to use 3-4 criteria.
Thanks so much for the help.
Jaimee
Last edited: