H
HeatherD25
Hi,
I have 2 tables - a main table (tbl_Opportunity) and a look-up table
(tbl_AMContacts). I have a field in each (AllianceMgr) that links the two
tables together (AllianceMgr is the primary key on the AMContacts table).
I'm trying to do a query that combines all of this data together so I can
display it on a form. But, if the AllianceMgr is blank on the main table,
when I do the query it doesn't display any of those records. I want it to
display all records -- even if there is a null in the AllianceMgr field. I
tried using the nz function, but couldn't seem to get it to work. Here is
what I was trying:
SELECT tbl_Opportunity.Opportunity_ID, tbl_Opportunity.AccountName,
tbl_Opportunity.EngagementDesc, tbl_Opportunity.AllianceMgr,
Nz(tbl_AMContacts.Title,0), Nz(tbl_AMContacts.Phone1,0)
FROM tbl_AMContacts INNER JOIN tbl_Opportunity ON tbl_AMContacts.AMName =
tbl_Opportunity.AllianceMgr;
Thanks!
Heather
I have 2 tables - a main table (tbl_Opportunity) and a look-up table
(tbl_AMContacts). I have a field in each (AllianceMgr) that links the two
tables together (AllianceMgr is the primary key on the AMContacts table).
I'm trying to do a query that combines all of this data together so I can
display it on a form. But, if the AllianceMgr is blank on the main table,
when I do the query it doesn't display any of those records. I want it to
display all records -- even if there is a null in the AllianceMgr field. I
tried using the nz function, but couldn't seem to get it to work. Here is
what I was trying:
SELECT tbl_Opportunity.Opportunity_ID, tbl_Opportunity.AccountName,
tbl_Opportunity.EngagementDesc, tbl_Opportunity.AllianceMgr,
Nz(tbl_AMContacts.Title,0), Nz(tbl_AMContacts.Phone1,0)
FROM tbl_AMContacts INNER JOIN tbl_Opportunity ON tbl_AMContacts.AMName =
tbl_Opportunity.AllianceMgr;
Thanks!
Heather