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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select records based on a text box

Status
Not open for further replies.

cantona

Technical User
May 20, 2001
121
GB
I have a form which contains a text box entitled [SurnameSearch]. When a user enters a surname a query is run to select the relevant records. The query uses the criteria below;


Surname = [Forms]![New_archive_search]![SurnameSearch]

This works fine where the user types in the surname exactly correct. However it returns no records if they dont spell it exactly the same. How can i amend the query to bring back records which are similar to what the user has entered, or even surnames beginning with the same first few letters?

 

To match the first few characters:

Surname Like [Forms]![New_archive_search]![SurnameSearch] & "*"

To match one character, you can use a ? character.

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top