Greetings Folks,
I've searched around this forum and got some helpful answers but none of the coding I've got from here solves what I'm trying to do.
I'd like to create a single page report that sums all the yes/no answers (radio buttons) from a questionnaire. I've created a query from the main table using the original fields and an IIf to get a numerical value and the following code(s) in my report:
Query code (in the field box):
field_name_value: IIf([field_name]=YES,1,0)
This does return 1 if field_name is checked and 0 if not.
Report code (in a text box):
=Sum(IIf([query]!field="YES",1,0))
=Sum(IIf([query]!field="-1",1,0))
=Sum(IIf([query]!field_value="1",1,0))
=Sum(Abs([query]!field_value))
The only response I get from any of these codes in the report is #ERROR.
Am I missing something?
I've searched around this forum and got some helpful answers but none of the coding I've got from here solves what I'm trying to do.
I'd like to create a single page report that sums all the yes/no answers (radio buttons) from a questionnaire. I've created a query from the main table using the original fields and an IIf to get a numerical value and the following code(s) in my report:
Query code (in the field box):
field_name_value: IIf([field_name]=YES,1,0)
This does return 1 if field_name is checked and 0 if not.
Report code (in a text box):
=Sum(IIf([query]!field="YES",1,0))
=Sum(IIf([query]!field="-1",1,0))
=Sum(IIf([query]!field_value="1",1,0))
=Sum(Abs([query]!field_value))
The only response I get from any of these codes in the report is #ERROR.
Am I missing something?