A
Afrosheen via AccessMonster.com
The code below works great. I just want to make it work better.
I want the ability to do the search with a Wild Card * So when I put in Dom
it will give me all the names with the letters Dom and beyond like Dominic
and so on. Is there a way of doing this?
10 If IsNull(Me![txtSearch]) Or (Me![txtSearch]) = "" Then
20 MsgBox "Please enter a value!", vbOKOnly, "Invalid Search Criterion!
"
30 Me![txtSearch].SetFocus
40 Exit Sub
50 End If
'---------------------------------------------------------------
'Performs the search using value entered into txtSearch and evaluates
this against values in lName
60 'strwhere = txtSearch
strWhere = "[lname] = '" & Me!txtSearch & "'"
Filter = strWhere
FilterOn = True
Thanks for your help.
I want the ability to do the search with a Wild Card * So when I put in Dom
it will give me all the names with the letters Dom and beyond like Dominic
and so on. Is there a way of doing this?
10 If IsNull(Me![txtSearch]) Or (Me![txtSearch]) = "" Then
20 MsgBox "Please enter a value!", vbOKOnly, "Invalid Search Criterion!
"
30 Me![txtSearch].SetFocus
40 Exit Sub
50 End If
'---------------------------------------------------------------
'Performs the search using value entered into txtSearch and evaluates
this against values in lName
60 'strwhere = txtSearch
strWhere = "[lname] = '" & Me!txtSearch & "'"
Filter = strWhere
FilterOn = True
Thanks for your help.