|
-
Jun 10th, 2000, 12:26 AM
#1
Thread Starter
Addicted Member
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
-
Jun 10th, 2000, 02:50 AM
#2
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.
"It's cold gin time again ..."
Check out my website here.
-
Jun 10th, 2000, 03:50 AM
#3
Thread Starter
Addicted Member
Thanks Bruce, it works great.
I had the first part of the statement right but I had
& "*" instead of "*'"
Thanks again
GRAHAM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|