I've been trying to build a search form in Access 2013 that takes the value of a single text box and searches it across a table.
What I would like it to do is search the table and if it finds a result, load the record into text boxes on the form for updating/exporting to another form/deleting.
After searching online I am using this search string:
It doesn't scream any errors at me when I run the string but I don't know how to make it display any results
Id love it to display a message box saying there are X results then load the first results into this table (http://imgur.com/rfehRRJ)
Maybe I over complicating things I honestly have no idea.
Edit: Does an SQL search look for the whole record or part? Like if you have first and last name as 1 field and you only enter the persons first name, will it still return a result?
Thanks
What I would like it to do is search the table and if it finds a result, load the record into text boxes on the form for updating/exporting to another form/deleting.
After searching online I am using this search string:
Code:
dim strSEARCH as string dim SQL ass string SQL = "select * from tblcustdet where ((customername like ""*" & strSEARCH & "*"") or (Street like ""*" & strSEARCH & "*"") or (Suburb like ""*" & strSEARCH & "*"") or (PostCode like ""*" & strSEARCH & "*"") or (LandlineNumber like ""*" & strSEARCH & "*"") or (MobileNumber like ""*" & strSEARCH & "*"") or (EmailAddress like ""*" & strSEARCH & "*""))"
Id love it to display a message box saying there are X results then load the first results into this table (http://imgur.com/rfehRRJ)
Maybe I over complicating things I honestly have no idea.
Edit: Does an SQL search look for the whole record or part? Like if you have first and last name as 1 field and you only enter the persons first name, will it still return a result?
Thanks
Comment