finding similiar records

kato68

Registered User.
Local time
Today, 08:15
Joined
May 12, 2003
Messages
45
I have two tables with an ID field in both and a last name field in both. I want to compare the two tables and see if the last name fields are similar in both tables by ID (the ID is unique). In one table the last name is one word whereas in the other table the last name field has (lastname firstname) separating by a space. How can I compare the two by using just the first word from the last name field that has more than one word. I tried...

Like *" Left([parcel_cases].[ownr_lnam],InStr(1,[parcel_cases].[ownr_lnam]," ")) "*

-where parcel_cases is the table that has multiple words in the field and i used this in the criteria for the field in the other table.

...and other similar combos, but I keep getting an errors or no records found, which is not correct.

I hope i explained this well.
 
There is a problem with your syntax. Try this...

Code:
Like "*" & Left([parcel_cases].[ownr_lnam], InStr([parcel_cases].[ownr_lnam], " ") -1) & "*"

You may want to try it with and without the Like operator and the wildcard if you need your results to be more precise.
 

Users who are viewing this thread

Back
Top Bottom