Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Look up with wildcard

Status
Not open for further replies.

Kolawa

Programmer
Aug 22, 2004
1
US
I have created a form that can be used to find a part in a database. I want an asterik (wildcard) to automatically be placed at the beginning and end of all entries so that all parts will show up that have the same sequence that was entered. I noticed that quotation marks are automatically placed. Is there a way to add the asterisk that work the same way as the quotes?
 
On the "Find button" the onclick event will start the search. Either you used the wizard, or you have your own. Either way....

dim searchTerm as String

searchTerm = """*" & Me.txtSearchTerm.Value & "*"""

This will append wildcards (*) around the search term. Then use the string as required

MrSmurf
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top