Query Me This -- two references to another tables field
- From: "CS" <dukster77@xxxxxxxxxxxxxxxxxx>
- Date: Sat, 25 Jun 2005 10:29:24 -0700
I have:
tblContacts -- primary key is ContactID, autonumber -- general contact info
tblReferrals -- primary key is RContactID, number, no duplicates -- table
contains info
about who referred who.
In tblReferrals, the ContactID from tblContacts is referenced twice -- once
as the Primary Key RContactID which says who is being referred, again under
ReferredByContactID (foreign key number field) which says
who referred them.
I want to query these tables to print a cross-reference report of who
referred
who, and show the concatenated full names of both the person being referred
and the person referring them.
My problem: If I join the tables in the query by
tbleContacts.ContactID<>tblReferrals.RContactID, I can concatenate the
name of the person being referred, but not the name of the person referring
them. If I join by ContactID<>ReferredByContactID, same problem in
reverse -- name of referrer but not the person referred.
How can I query to pull from the tblContacts the full concatenated name of
both the person being referred and the person who is referring them?
Thanks in advance for any help.
Carol
.
- Follow-Ups:
- Re: Query Me This -- two references to another tables field
- From: Steve Schapel
- Re: Query Me This -- two references to another tables field
- Prev by Date: Re: new database
- Next by Date: Re: Query Me This -- two references to another tables field
- Previous by thread: Need advice on choosing template...
- Next by thread: Re: Query Me This -- two references to another tables field
- Index(es):
Relevant Pages
|