Khalid,
I would not add records to tables before there is information to store in them. As per my previous response, use joins that select all records from one of the tables. For instance if you have customers and orders tables and you want to return all of the customers regardless of if they have placed an order your query SQL would be something like:
Note the LEFT JOIN.
Regards,
Duane Hookom
Minnesota
Sent: Wednesday, August 2, 2017 2:47 AM
To: MS_Access_Professionals@yahoogroups.com
Subject: Re: [MS_AccessPros] Report not giving complete data
Duane,
---In MS_Access_Professionals@yahoogroups.com, <duanehookom@...> wrote :
I expect there might be some records that don't have matching/related records in other tables. Have you tried looking at the full query records without the membership type filter? Have you tried changing the joins to LEFT or RIGHT joins?
Regards,
Duane Hookom
Sent: Tuesday, August 1, 2017 1:19 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Report not giving complete data
Hi all,
I have a report "List of Members For Printing Directory" having Record Source "List of Members Selective Membership Type Query" its SQL is:
SELECT [Members].[MembershipType], [Members].[MemberID], [Members].[GenderStatus], [Members].[Salutation_Detail], [Members].[SurName], [Members].[GivenName], [Members].[GivenName] & " " & [SurName] AS MemberName, Members.MembershipStartDate, tblCNIC.[CNIC Number], Members.DesignationSOC, tblJob.OrganizationDesignation, tblJob.Organization, tblAddress.[Postal Address], tblContactNumbers.TelephoneOffice, tblContactNumbers.TelephoneResidence, tblContactNumbers.FaxNo, tblContactNumbers.MobileNo1, tblContactNumbers.MobileNo2, tblContactNumbers.FaxNo, tblElectronicContacts.MemberEmail, Members.Working, tblAddress.MainCityName
FROM ((((Members INNER JOIN tblAddress ON Members.MemberID = tblAddress.MemberID) INNER JOIN tblCNIC ON Members.MemberID = tblCNIC.MemberID) INNER JOIN tblContactNumbers ON Members.MemberID = tblContactNumbers.MemberID) INNER JOIN tblElectronicContacts ON Members.MemberID = tblElectronicContacts.MemberID) INNER JOIN tblJob ON Members.MemberID = tblJob.MemberID
WHERE (((Members.MembershipType)=[Forms]![Dialog Members Directory Report]![cboMembershipType]) AND ((Members.Working)=True))
ORDER BY Members.GivenName, [Members].[GivenName] & " " & [SurName];
Posted by: Duane Hookom <duanehookom@hotmail.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (4) |
Tidak ada komentar:
Posting Komentar