Hi,
I have the following code on an afterupdate event for a text box on a form:
Dim strsearch As String
Dim strtext As String
strtext = Me.txtSearch.Value
strsearch = “SELECT * from tblvaluations where ((surname1 like “”*” & strtext & “*””) or (surname2 like “”*” & strtext & “*””) or (vstreetname like “”*” & strtext & “*””) or (vpostcode like “”*” & strtext & “*””) or (hometel like “”*” & strtext & “*””) or (mobiletel like “”*” & strtext & “*””) or (vstreetname like “”*” & strtext & “*””)or (emailaddress like “”*” & strtext & “*””))”
Me.RecordSource = strsearch
However the text box that I want to use to search the information within tblValuations could sometimes have the combination of VHouseNo and Vstreetname. How can I get it to look for the contents of the search box strtext to look at the combined value of vhouseno and vstreetname?