QRY to get values from 2 tables

kusumerumaal

New member
Local time
Today, 14:32
Joined
Sep 27, 2006
Messages
5
Hi all....

I have been beating my head for 2 days on this. Any help will be GREAT!
I have 2 tables: CLIENTS and RELATION

NAMES has the client_ID, first_name and last_name along with other information for clients. RELATION is how the clients fit with each other. RELATION has relation_ID, Relations_description and up to three fields where we can enter the ID of clients from the client table called Rel1_ID, Rel2_ID, and Red3_ID. Now all the three rel_IDs come from CLIENTS and stores only the client_ID. There are multiple relationships.

How can I display the names and not the IDs for the clients?

I am able to display only one client name. I need this for form as well as report. I can do dlookup for form but don't know for reports. I am thinking that if I have it in the query, then I can use that for the form as well as reports.

I am able to show the the name for one client by running the following qry. But I am not able to modify that to show the other 2 names.

SELECT RELATION.Team_Name, RELATION.relations_Description, RELATION.rel1_ID, RELATION.rel2_ID, RELATION.rel3_ID], [client.f_name] & " " & [Client.l_name] AS Client_Name
FROM RELATION, CLIENTS
WHERE ((([relation.rel1_id])=[client.client_id]));
 
Hey...I got it working. Thanks for reading. I actually had upto three clients added in the same relationship and I needed this query for that.

Thanks though:D
 
Did you get rid of the third ID field?
 

Users who are viewing this thread

Back
Top Bottom