Hey all,
I'm using Access 2010. I have a query that should at least return 70 records, but it doesn't return anything. I need to match first and last name of name1 field of contacts table with first, last, and middle initial fields of temp_table or first and last name of name2 field of contacts table with first, last, and middle initial fields of temp_table.
However, the contacts table contains a lot of extra characters that the temp_table won't have. Hence, I need to use LIKE. Also the last name of temp_table can be in either the name1 field or name2 field of contacts table and that's why I said "or" above to check the first, last, and middle initial in both name1 and name2 fields.
So I came up with the below query but it didn't work:
contacts table
name1: AYBAR,ROBIN F &
name2: % MARGARET FARMER
temp_table
last_name: MARGARET
first_name: ROBIN
middle_initial: F
(note though there might not be a middle initial for a record in temp table!)
This is query:
Thanks for any response.Code:Field: name_1, name_2, address, city, us_state, zip_codes Table: contacts, contacts, contacts, contacts, contacts, contacts Sort: Show: Criteria: (in name_1 column): Like "*[temp_table].[last_name]*" And Like "*[temp_table].[first_name]*" And Like "*temp_table.[middle_initial]*" Or: (in name_2 column) Like "*[temp_table].[last_name]*" And Like "*[temp_table].[first_name]*" And Like "*temp_table.[middle_initial]*"