G
Guest
I am trying to filter a form to only display the records that match what is
listed in the combo box. For the most part it is working. My issue right
now is that when i make my selection in my combo box a pop-up screen appears
saying "Enter Parameter Value" then below it gives the value of my selection
and then also gives a box to enter in a value. The only way that it will
pull up the records is if I type in the same value as what i selected in the
combo box. What is wrong with my code?
The code i am using is:
Private Sub cboDescriptor_AfterUpdate()
Dim strWhere As String
If Me.Dirty Then 'Save any edits
Me.Dirty = False
End If
With Me.cboDescriptor
If IsNull(.Value) Then 'Show all records
If Me.FilterOn Then
Me.FilterOn = False
End If
Else
strWhere = "[Descriptor]= " & .Value
Me.Filter = strWhere
Me.FilterOn = True
End If
End With
End Sub
listed in the combo box. For the most part it is working. My issue right
now is that when i make my selection in my combo box a pop-up screen appears
saying "Enter Parameter Value" then below it gives the value of my selection
and then also gives a box to enter in a value. The only way that it will
pull up the records is if I type in the same value as what i selected in the
combo box. What is wrong with my code?
The code i am using is:
Private Sub cboDescriptor_AfterUpdate()
Dim strWhere As String
If Me.Dirty Then 'Save any edits
Me.Dirty = False
End If
With Me.cboDescriptor
If IsNull(.Value) Then 'Show all records
If Me.FilterOn Then
Me.FilterOn = False
End If
Else
strWhere = "[Descriptor]= " & .Value
Me.Filter = strWhere
Me.FilterOn = True
End If
End With
End Sub