Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding Values on a Form

Status
Not open for further replies.

SherryLynn

Technical User
Feb 4, 2001
171
CA
I have a database that tracks individuals. On the main form one of the items we record is the Sex of the person (i.e. Male or Female). On a statistics report that I am building I need to show a total of how many Males and Females there are in a particular set of records. Is there a way to put/write an expression on the form to calculate these totals? Or would it have to be done in a query somehomw? I really don't know how to go about this. Please help.

Thanks, Sherry
 
Take a look at HELP for Dcount

Basically, in the textbox control source type:
=dcount("field", "Table/Query", "[field] = '" & me.field & "'")

It says, count [fieldA records] in tableA Where [fieldA value] is equal to formA.FieldA ..... whatever criteria you'd like.

Good luck!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top