Hi there,
I currently am trying to generate a report. I have a bunch of option buttons on my form. What I am tryign to do is generate a list of each option selected.
So a list of how many times each option is selected. Sicne each option has its own field in the table i'm having trouble executing a if statment. This what i Have so far and i keep getting a syntax error:
SELECT complaints.[comp num], complaints.[last name], complaints.[first name], complaints.services, complaints.programs, complaints.treatment,
FROM complaints
WHERE
If [Forms]![ReportConcernForm]![TypeofConcern] = "services" Then
complaints.services = "True"
Else if [Forms]![ReportConcernForm]![TypeofConcern] = "programs" Then
complaints.programs = "True"
Else if [Forms]![ReportConcernForm]![TypeofConcern] = "treatment" Then
complaints.treatment = "True";
So services, programs, treatment are the options (there are more but too amny to list), a user can select one or more on the form.
Thanks,
I currently am trying to generate a report. I have a bunch of option buttons on my form. What I am tryign to do is generate a list of each option selected.
So a list of how many times each option is selected. Sicne each option has its own field in the table i'm having trouble executing a if statment. This what i Have so far and i keep getting a syntax error:
SELECT complaints.[comp num], complaints.[last name], complaints.[first name], complaints.services, complaints.programs, complaints.treatment,
FROM complaints
WHERE
If [Forms]![ReportConcernForm]![TypeofConcern] = "services" Then
complaints.services = "True"
Else if [Forms]![ReportConcernForm]![TypeofConcern] = "programs" Then
complaints.programs = "True"
Else if [Forms]![ReportConcernForm]![TypeofConcern] = "treatment" Then
complaints.treatment = "True";
So services, programs, treatment are the options (there are more but too amny to list), a user can select one or more on the form.
Thanks,