DCount Function (1 Viewer)

Petersen

Registered User.
Local time
Today, 10:54
Joined
Jan 31, 2000
Messages
10
I’m trying to sum the number of “Yes’s” in a Yes/No field on a report.

1) In the footer of the report I created an unbound text field
2) I then went to Properties, Control Source, and typed in the DCount function as follows: =DCount([FieldName],"-1") ... no luck ...

I’m confused. Any help will be appreciated.
 

MarionD

Registered User.
Local time
Today, 10:54
Joined
Oct 10, 2000
Messages
421
Hi there,

Try =Dcount("*";"Same Table/query as your reportsource";"[Fieldname]=-1")

I'm not sure if you use semicolons or commas in an English Access? I work on a German system.
 

Petersen

Registered User.
Local time
Today, 10:54
Joined
Jan 31, 2000
Messages
10
No luck. I'm still getting an error. (English system ... used commas). Any other ideas?
 

Jack Cowley

Registered User.
Local time
Today, 10:54
Joined
Aug 7, 2000
Messages
2,639
=DCount("Y/NField","YesNoTable","Y/NField = -1")
Or
=Sum(IIF([Y/NField],1,0)

SPEBQSA - Did I remember that right?
 

Users who are viewing this thread

Top Bottom