I have a combobox that filters data on the form in the afterupdate event.
Following is the query I have been trying to use to filter data.This code filters data effectively but the problem that I am facing is that when I select "<ALL>" from the combobox no data is displayed.What could be wrong?How can I display all the data of the form on selection of "<ALL>"
Following is the query I have been trying to use to filter data.This code filters data effectively but the problem that I am facing is that when I select "<ALL>" from the combobox no data is displayed.What could be wrong?How can I display all the data of the form on selection of "<ALL>"
Code:
Dim strCriteria As String
strCriteria = "[Jobno]='" & cboPMNO & "'"
Set rst = Me.RecordsetClone
If strCriteria = "<ALL>" Then
Me.FilterOn = False
ElseIf rst.NoMatch Then
MsgBox "No entry found"
Else
Me.FilterOn = False
Me.Filter = strCriteria
Me.FilterOn = True
End If
Comment