D
David
Hello
I'm trying to filter data in a form (It does not have a Subform) based on
what what user types in two unbound text boxs. I am able to do this based of
one but I want to filter for 2, so that where my problem lies.
Here is what I been playing around with, but it does not work. It will
filter for the first textbox then clear the filter and filter for the next
textbox.
Private Sub Command27_Click()
If IsNull(Me.FilterLName) Then
MsgBox "Please Enter Student's Last Name"
FilterLName.SetFocus
Else
Me.Filter = "Lname = """ & Me.FilterLName & """"
Me.FilterOn = True
Me.Filter = "Fname = """ & Me.FilterLName & """"
Me.FilterOn = True
End If
End Sub
Any help would be great, thank you
I'm trying to filter data in a form (It does not have a Subform) based on
what what user types in two unbound text boxs. I am able to do this based of
one but I want to filter for 2, so that where my problem lies.
Here is what I been playing around with, but it does not work. It will
filter for the first textbox then clear the filter and filter for the next
textbox.
Private Sub Command27_Click()
If IsNull(Me.FilterLName) Then
MsgBox "Please Enter Student's Last Name"
FilterLName.SetFocus
Else
Me.Filter = "Lname = """ & Me.FilterLName & """"
Me.FilterOn = True
Me.Filter = "Fname = """ & Me.FilterLName & """"
Me.FilterOn = True
End If
End Sub
Any help would be great, thank you