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

Use of Wildcard in Query

Status
Not open for further replies.

surfbum3000

Technical User
Aug 22, 2003
156
US
I have 2 tables:
tblCaseNos
tblLongDrive
Joins: [tblCaseNos.Name] = [tblLongDrive.Name]

I want to add tblCaseNos.CaseNo to the table tblLongDrive to create a new table with the CaseNo.

The problem is the names are not exact in both tables. The tblCaseNos has Middle Name, Suffix (eg. III), etc. and the tblLongDrive has only LastName, FirstName. How can I query the name using a wildcard?
 
Here is the answer:

LastName: Left([Name],InStr([Name],", ")-1)

FirstName: Mid([Name],InStr([Name]," ")+1)

This works for Name in table entered as LastName, FirstName
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top