Hey Jack...thanks for the respone.
No...it could be anywhere within the string of letters / characters. I'm
trying to join these fields in order to run a query that brings together data
from both tables. I've tried running the query with Like and wildcard but
the results aren't correct because these two fields aren't equal. So,
inTbl1, I want the query to provide product, mktg division, part number and
options (which is the AB&xxx.LXz field). In Tbl2, I want the query to
provide vehicle code, vehicle name and engine (which is the AB field). The
options field in Tbl1 (AB&xxx.LXz) contains the engine data (AB) from Tbl2.
There could be several engines listed in the options field in Tbl1 but only
one engine listed in Tbl2. Therefore, I need all of the records returned
from Tbl1 but based on the engine data from Tbl2.
I thought maybe a Union Query but don't know the sql language to use. I'm
not sure if I can join these fields at this point.
Thanks.
Lisa
Dymondjack said:
Is it always the first two letters in Tbl1 that match tbl2? If so, try
something like this:
WHERE mid([Tbl1.Field], 1, 2) = [Tbl2.Field])
The Mid function above would select only the first two characters of Tbl1
and try to match them with Tbl2. The Like comparison and wildcard may also
work. Don't take the syntax above for granted... I'm not sure where you are
trying to apply this, so the statement is 'reference only'
HTH
-jack
Lisa said:
I am using Access 2002. I created two tables and want to join them on three
fields. All text fields. Two fields from each table match (ie. Tbl1 = ABC
and Tbl2 = ABC). The third field from Tbl1 contains part of the data that I
need but doesn't exactly match the corresponding field in Tbl2 (ie. Tbl1 =
AB&xxx.LXz and Tbl2 = AB). How can I join all three fields to get an
accurate output? I'm new at this! Thanks