DCount help (1 Viewer)

lorenzoaj

Registered User.
Local time
Today, 00:43
Joined
Nov 26, 2001
Messages
32
I have this in the control source for a txt box on a report. It works great but I need help. The [Loss] field is set to yes/no in the table. What do I need to put to have it count the boxes that have been checked?

=DCount("[AUTH MOS]","tblGroupOfficerSlate","[AUTH Gr] = 'COL' AND [Battalion] = '43 ASG' AND [AUTH MOS] = '90A' AND [Loss] = '?' ")

Thanks

AJ
 

ghudson

Registered User.
Local time
Today, 02:43
Joined
Jun 8, 2002
Messages
6,195
try

=DCount("[AUTH MOS]","tblGroupOfficerSlate","[AUTH Gr] = 'COL' AND [Battalion] = '43 ASG' AND [AUTH MOS] = '90A' AND [Loss] = -1")

If the values in your table are stored as -1 or 0 for the check boxes.

-1 = True/Yes
0 = False/No

HTH
 

lorenzoaj

Registered User.
Local time
Today, 00:43
Joined
Nov 26, 2001
Messages
32
That worked great. Thanks a bunch.


AJ
 

Users who are viewing this thread

Top Bottom