-
This works fine, but relies on inputting the full name and correct spelling of the name.
prompt = "Enter a name to search for"
title = "NAME SEARCH"
employee = InputBox(prompt, title)
search = "Name = '" + employee + "'"
' Find the record
Data1.Recordset.FindFirst (search)
Could someone give me a (search =) line that assuming a name was joe bloggs would find the record if just "joe" or "bloggs" was entered.
Any help appreciated
GRAHAM :)
-
Try this:
search = "Name LIKE '*" & employee & "*'"
Your FindFirst should then return the first record where the Name field contains the string that the user entered.
P.S.: It is better to use & for concatenation.
-
Thanks Bruce, it works great.
I had the first part of the statement right but I had
& "*" instead of "*'"
Thanks again
GRAHAM :D