Fields in Query not showing on Report

P

Paige_Franklin

I have a report that when I run it is not showing me all the field values in
the query. When I run the query all the values show up. There are two
queries - one gets the people and the other adds a work address if the home
address is not there. The Address lines are not printing on some of the
reports.

Here is the first query:
SELECT dbo_tblPeopleAddresses.AssocHospital,
dbo_tblPeopleAddresses.Organization, dbo_tblPeopleMCodes.MCode, [First] & " "
& [Mid] & " " & [Last] & " " & [Suffix] AS BillName,
dbo_tblPeopleAddresses.Title AS BillTitle, dbo_tblPeopleAddresses.Street1,
dbo_tblPeopleAddresses.Street2, dbo_tblPeopleAddresses.City,
dbo_tblPeopleAddresses.State, dbo_tblPeopleAddresses.Zip
FROM (dbo_tblPeople LEFT JOIN dbo_tblPeopleAddresses ON
(dbo_tblPeople.PreferredAddressType = dbo_tblPeopleAddresses.AddressType) AND
(dbo_tblPeople.PeopleID = dbo_tblPeopleAddresses.PeopleID)) LEFT JOIN
dbo_tblPeopleMCodes ON dbo_tblPeople.PeopleID = dbo_tblPeopleMCodes.PeopleID
WHERE (((dbo_tblPeopleMCodes.MCode)="PER"))
ORDER BY [First] & " " & [Mid] & " " & [Last] & " " & [Suffix];

Here is the second Query that is built off the first query:
SELECT IIf(IsNull([Organization]),[Hospital],[Organization]) AS Facility,
qry_POSITIONS_PER1.BillName, qry_POSITIONS_PER1.BillTitle,
IIf(IsNull([qry_Positions_per1.Street1]),[dbo_tblFacilities.street1],[qry_Positions_per1.street1])
AS Address1,
IIf(IsNull([qry_Positions_per1.Street1]),[dbo_tblFacilities.street2],[qry_Positions_per1.street2])
AS Address2,
IIf(IsNull([qry_Positions_per1.Street1]),[dbo_tblFacilities.city],[qry_Positions_per1.city])
AS City,
IIf(IsNull([qry_Positions_per1.Street1]),[dbo_tblFacilities.state],[qry_Positions_per1.state])
AS State,
IIf(IsNull([qry_Positions_per1].[Street1]),[dbo_tblFacilities.zip],[qry_Positions_per1.zip])
AS Zip, [City] & ", " & [State] & " " & [Zip] AS Address3,
tbl_Rates.PersonalRate AS rate, tbl_Statement.StatementText,
tbl_Statement.RemitText, tbl_Statement.AttentionText
FROM tbl_Rates INNER JOIN tbl_Statement ON tbl_Rates.FiscalYear =
tbl_Statement.FiscalYear, qry_POSITIONS_PER1 LEFT JOIN dbo_tblFacilities ON
qry_POSITIONS_PER1.AssocHospital = dbo_tblFacilities.KHAID
ORDER BY IIf(IsNull([Organization]),[Hospital],[Organization]);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top