I'll answer you twice. Once as a band-aid, once as a correct method. The situation you have is
Table 1 has
-- PK1
-- other data
Table 2 has
-- PK2
-- other data
AND PK1 is a formal subset string of PK2. Further, PK2 is created by concatenation of a letter to a key from PK1.
EITHER SOLUTION presumes that you NEVER, EVER wrote PK2 with a "blank" for the first case where PK2 was derived from PK1.
OK, first way:
You need a query like this...
SELECT ..... FROM Table1, Table2 WHERE
[Table1].[PK1] = Left$( [Table2].[PK1], Len( [Table2].[PK2] - 1 ) AND .... (any other criteria as appropriate)
Problems: (1) You had better not forget to concatenate the letter to PK2 even if there is only one entry. (2) You had better not get too many variants with the same subset key in table2.
Now, the better way. Better, but not necessarily prettier to retrofit. But FAR better down the road.
Make a backup of your database just in case this hoses up.
In table2, go into design view.
Take the "Primary Key" designation off of PK2. Set the field to be No Index.
Add a text field next to PK2. Could be a single character. Set the field to be No Index.
Now write an update query to deposit Right$( PK2, 1 ) into the new field. Execute the update. Don't take the next step until this step runs to a successful completion.
Now write an update query to change PK2 to Left$( PK2, Len(PK2) - 1 ). Execute it.
Click on both the PK2 field and the new field (which should, for convenience sake, be adjacent). Now re-establish the pair of fields as a compound primary key. You should also be able to establish a separate non-prime index on the original PK2 field, one that allows duplicates.
From that point forward, instead of appending a letter to PK1 to form a new PK2, just copy PK1 into PK2 and store that discriminator letter in the new field.
OK, now you can DIRECTLY relate Table1 to Table2. You can do a formal relationship between the two tables. Which means that JOIN operations will work automatically.
The catch is, if anything depended on the original format of PK2, it now must depend on the concatenation of the NEW PK2 & {the new discriminator field}
If the assumption stated before these solutions is NOT met (i.e. sometimes PK2 uses a blank as a discriminator), you have already screwed yourself royally. I don't know of any way to recover from that situation.