I
Ian
someone was nice enough to point me in the correct direction to apply filters
using text boxes. However, after finishing the string I realized the filters
were acting individually and I had no idea how to combine 3 or 4 text boxes
to create one filter.
Here is the sting. Hope someone can help. Thanks Ian.
Hey Bill -- hope your still around. I've got the form filtering based on
each of 4 fields (LastName, firstname, id and phone). With the query method
I could make it use a combination of the filters to filter the records. with
the VBA filter method it only uses the last updated field. I assume I need
to join the filter codes together under each of the OnChange event
properties. Can you tell me how to join the fields? Here are the 4 Change
events.
Private Sub CID_Change()
Me.Frm_AllClientsSub.Form.Filter = "[ClientID] LIKE '" & Me.CID.Text & "*'"
End Sub
Private Sub FN_Change()
Me.Frm_AllClientsSub.Form.Filter = "[First Name] LIKE '" & Me.FN.Text & "*'"
End Sub
Private Sub HPhone_Change()
Me.Frm_AllClientsSub.Form.Filter = "[Home Phone] LIKE '" & Me.HPhone.Text &
"*'"
End Sub
Private Sub LN_Change()
Me.Frm_AllClientsSub.Form.Filter = "[Last Name] LIKE '" & Me.LN.Text & "*'"
End Sub
using text boxes. However, after finishing the string I realized the filters
were acting individually and I had no idea how to combine 3 or 4 text boxes
to create one filter.
Here is the sting. Hope someone can help. Thanks Ian.
Hey Bill -- hope your still around. I've got the form filtering based on
each of 4 fields (LastName, firstname, id and phone). With the query method
I could make it use a combination of the filters to filter the records. with
the VBA filter method it only uses the last updated field. I assume I need
to join the filter codes together under each of the OnChange event
properties. Can you tell me how to join the fields? Here are the 4 Change
events.
Private Sub CID_Change()
Me.Frm_AllClientsSub.Form.Filter = "[ClientID] LIKE '" & Me.CID.Text & "*'"
End Sub
Private Sub FN_Change()
Me.Frm_AllClientsSub.Form.Filter = "[First Name] LIKE '" & Me.FN.Text & "*'"
End Sub
Private Sub HPhone_Change()
Me.Frm_AllClientsSub.Form.Filter = "[Home Phone] LIKE '" & Me.HPhone.Text &
"*'"
End Sub
Private Sub LN_Change()
Me.Frm_AllClientsSub.Form.Filter = "[Last Name] LIKE '" & Me.LN.Text & "*'"
End Sub