Option Group

G

Guest

I have a Survey form with an option group. In a report, I need a count of
each option. The option group is bound to a field. How would I write this
code and where would it go?

Thanks
 
G

Guest

In the Text Box ControlSource you can use something like

To count an option use iif to return value if criteria met, and then sum all
this 1'ns

=Sum(IIf([FieldName] = Value,1,0))
 
F

fredg

I have a Survey form with an option group. In a report, I need a count of
each option. The option group is bound to a field. How would I write this
code and where would it go?

Thanks

The stored Option values are 1, 2, 3, 4, etc...

Every record in the table is in the report?
=DCount("*","TableName","[OptionField] = 1")
=DCount("*","TableName","[OptionField] = 2")
etc.

Only some of the records in the table are included in the report?
=ABS(Sum([OptionField]=1))
=ABS(Sum([OptionField]=2))
etc....
 

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