I am trying to filter a datasheet form using a combo box and have not had any success. The combo box is located in the form header and the code is tied to the change event.
I keep getting the following error.
Run-time error '3075':
Syntax error (missing operator) in query expression 'Production
Source="Secondary'".
Here is the code.
Private Sub Combo19_Change()
Dim strFilter As String
' Build criteria string.
strFilter = BuildCriteria("Production Source", dbText, Combo19)
' Set Filter property to apply filter.
Me.Filter = strFilter
' Set FilterOn property; form now shows filtered records.
Me.FilterOn = True
End Sub
Thank you for any help,
Michael
I keep getting the following error.
Run-time error '3075':
Syntax error (missing operator) in query expression 'Production
Source="Secondary'".
Here is the code.
Private Sub Combo19_Change()
Dim strFilter As String
' Build criteria string.
strFilter = BuildCriteria("Production Source", dbText, Combo19)
' Set Filter property to apply filter.
Me.Filter = strFilter
' Set FilterOn property; form now shows filtered records.
Me.FilterOn = True
End Sub
Thank you for any help,
Michael