Harry Taylor
Registered User.
- Local time
- Today, 06:09
- Joined
- Jul 10, 2012
- Messages
- 90
Hi All,
I have an Phonebook subform - (PBSubform)
with the following fields;
[Contact Name], [Company], [Telephone] & [Mobile]
Using an unbound textbox (Text2) I can search for a name using the following code;
Private Sub Text2_Change()
Dim strSQL As String
strSQL = "[Contact Name] LIKE " & Chr(34) & Me.Text2.Text & "*" & Chr(34)
Me.PBSubform.Form.Filter = strSQL
Me.PBSubform.Form.FilterOn = True
End Sub
How can I adapt the code so it filters all fields - [Contact Name], [Company], [Telephone] & [Mobile]
(Not just [Contact Name])
Thanks in advance
I have an Phonebook subform - (PBSubform)
with the following fields;
[Contact Name], [Company], [Telephone] & [Mobile]
Using an unbound textbox (Text2) I can search for a name using the following code;
Private Sub Text2_Change()
Dim strSQL As String
strSQL = "[Contact Name] LIKE " & Chr(34) & Me.Text2.Text & "*" & Chr(34)
Me.PBSubform.Form.Filter = strSQL
Me.PBSubform.Form.FilterOn = True
End Sub
How can I adapt the code so it filters all fields - [Contact Name], [Company], [Telephone] & [Mobile]
(Not just [Contact Name])
Thanks in advance