Counting data in the field

calimlimrodel

Registered User.
Local time
Tomorrow, 03:25
Joined
Feb 12, 2008
Messages
10
Need help....if i have data in the field example yes & No, how can i count the number of "No" and "Yes" data in the field (in a form view)?

Please help

thanks....
 
Without going into minute details, the following might work:

create a form and set the record source to the following query:

Select <FieldName with Y/N> AS FLDNAM, COUNT(*) AS TOTAL from <TableName> GROUP BY <FieldName with Y/N>

You can also add
ORDER BY <FieldName with Y/N> ASC (if you want No First)
OR
ORDER BY <FieldName with Y/N> DESC (if you want Yes First)

Once you have done this, create two controls (one for FLDNAM, and one for TOTAL)

This should give you a good start
 
Thanks for the help, one more thing, in my search form i would like to count the number of "yes" or "no" when i search for a team. Currently all the data are being counted even though i set the search range for a particular team only. Please see attached.

thanks,
 

Attachments

Users who are viewing this thread

Back
Top Bottom