DCount in Report

  • Thread starter Thread starter Sullivan
  • Start date Start date
S

Sullivan

Hey Roger

To get the information you are looking for, you need to
add primary to your list of constraints.

So, your DCount statement should look something like this:

=DCount("[Primary]","Macvip","[currhrs] > 0 AND
[VOL_STATUS] >= 'RET'",[Primary]='Y')

This should give you the information you are looking for.

Sullivan
Intermediate MS Access User
 
OK I tried that and I get the following result #Error. I
think I have tried everyway there is to write the
statement and either get 221 which is 15 to many or
#Error which is of no help either. Thanks for your
reply. Any other idea's? Could I not have something
turned on in the Text box?
Roger
-----Original Message-----
Hey Roger

To get the information you are looking for, you need to
add primary to your list of constraints.

So, your DCount statement should look something like this:

=DCount("[Primary]","Macvip","[currhrs] > 0 AND
[VOL_STATUS] >= 'RET'",[Primary]='Y')

This should give you the information you are looking for.

Sullivan
Intermediate MS Access User

-----Original Message-----
I have a db with 3 fields that need to be counted.
"Primary","CurrHrs","Vol_Status", for a report field.

So far I have used Count, DCount and IIF with no results
other than two of the fields being counted and one being
counted incorrectly.
The Primary field is a Yes/No field and access2000 is
counting both the "Y" and the No. The No field is left
blank "NULL". I need to count only
the "Y" with the other field restrictions in place.

I am using the following Dcount in the Control Source
window of a bound box.

=DCount("[Primary]","Macvip","[currhrs] > 0 AND
[VOL_STATUS] >= 'RET'")

When this is used it counts the Primary fild Y/Null
together and produces the wrong result.

Any help would be greatly appreciated. I am an amature
user of Access and working on a report as a Volunteer at
a military base. Thanks in advance.


.
.
 
Back
Top