Option Group

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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))
 
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....
 
Back
Top