forms_are_nightmares
Registered User.
- Local time
- Today, 15:34
- Joined
- Apr 5, 2010
- Messages
- 71
I've been monkeying around with this for a while and can't figure out where the syntax error is. Maybe a set of fresh eyes can help.
Scenario:
Form with multiple combo boxes. A button on the form that when clicked, will open a report based on the values in the combobox.
ComboBox1 lists names of individuals
ComboBox2 lists the regions the individuals are in.
When I click the button I get "Run-time error 3075: extra ) in expression"
I just can't see where that is.
Any help is appreciated - Code is below
If Not IsNull(Me.RegionCmbo) Then
DoCmd.OpenReport "rpt_rollout_specialist", acViewPreview, , "[Region] = '" & Me.RegionCmbo & "') And"
End If
If Not IsNull(Me.SpecialistCmbo) Then
DoCmd.OpenReport "rpt_rollout_specialist", acViewPreview, , "[Specialist] = '" & Me.SpecialistCmbo & "' And "
End If
Thanks
Scenario:
Form with multiple combo boxes. A button on the form that when clicked, will open a report based on the values in the combobox.
ComboBox1 lists names of individuals
ComboBox2 lists the regions the individuals are in.
When I click the button I get "Run-time error 3075: extra ) in expression"
I just can't see where that is.
Any help is appreciated - Code is below
If Not IsNull(Me.RegionCmbo) Then
DoCmd.OpenReport "rpt_rollout_specialist", acViewPreview, , "[Region] = '" & Me.RegionCmbo & "') And"
End If
If Not IsNull(Me.SpecialistCmbo) Then
DoCmd.OpenReport "rpt_rollout_specialist", acViewPreview, , "[Specialist] = '" & Me.SpecialistCmbo & "' And "
End If
Thanks