Totals in main form

  • Thread starter alawagi71 via AccessMonster.com
  • Start date
A

alawagi71 via AccessMonster.com

Hey Freinds!!
i have form called Workshops based on Workshops Table and subform called
Participants based on Participants Table.the relationship between the two
tables is one to many.
how to count number of males and females in each workshop and show them in
the main form.

thanks in advance
 
A

Allen Browne

1. Open the subform in design view.

2. Show the Form Header/Footer (on toolbar/menu.)

3. Add a text box to the Form Footer section.

4. Give it this Control Source:
=IIf([Gender]="M", 1, 0)

5. Adjust the expression to match your field name and data type.

6. Do the same thing for the count of females.

On the main form, you can now put a text box that reads this value from the
subform, e.g. its Control Source will be like this:
=[Sub1].[Form]![txtMaleCount]
 
Top