Calculating option group value in a report

P

Proffy

Hi. I have a question. In my database I have an option group (gender) and I
want to calculate the total for each of them separetedly, like 10 students, 3
males and 7 females, in my report. All I can get is the total for both
together. Appreciate your kindness..
Odir
 
F

fredg

Hi. I have a question. In my database I have an option group (gender) and I
want to calculate the total for each of them separetedly, like 10 students, 3
males and 7 females, in my report. All I can get is the total for both
together. Appreciate your kindness..
Odir

Add an unbound control to the Report Footer.
Set it's control source to:
What Option value is Male? Let's assume it's 1.
=Sum(IIf([OptionGroupName]=1,1,0))

What Option Value is Female? Let's assume 2.
=Sum(IIf([OptionGroupName]=2,1,0))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top