Home
Forums
New posts
Search forums
Articles
Latest reviews
Search resources
Members
Current visitors
Newsgroups
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Home
Forums
Newsgroups
Microsoft Access
Microsoft Access
With a Query in Access 2007, How can I Create This Query
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Terry, post: 13951913"] I need a query that will list all records in table 1 for which there are no auditor records (Table 3). Somehow, I need to use the relationship between tables 2 and 3 to find what's not in table 1. The following query gives me a list of all records that do have auditor records. I'm at a dead end on this one. Query SELECT PTOTNamesTbl.PTOTAuditingTherapist, PTOTAuditingTherapist.PTOTFirstName, PTOTAuditingTherapist.PTOTLastName, AuditDetailInitialEval.TherapistLastName, PTOTNamesTbl.PTOTFirstName, PTOTNamesTbl.PTOTLastName, AuditDetailInitialEval.Medicare, AuditDetailInitialEval.UniversityNumber, AuditDetailInitialEval.DateofService INTO tblCompletedAudits FROM PTOTNamesTbl AS PTOTAuditingTherapist INNER JOIN (PTOTNamesTbl INNER JOIN AuditDetailInitialEval ON PTOTNamesTbl.PTOTNamesID = AuditDetailInitialEval.TherapistLastName) ON PTOTAuditingTherapist.PTOTNamesID = PTOTNamesTbl.PTOTAuditingTherapist WHERE (((AuditDetailInitialEval.Medicare)=On) AND ((AuditDetailInitialEval.DateofService) Between #12/31/2008# And #1/1/2010#)) ORDER BY PTOTNamesTbl.PTOTAuditingTherapist; Table 1 Detail record, contains contactID1 as a foreign key. Table 2 Metadata table contains contact information ContactID1 (primary key), relationship between Table 2 (one) and Table 1 (many) Table 3 (virtual) Table 2 also has another ContactID2 field that is associated with ContactID1 (in the query design window, I add a second table 2 and give it an alias of auditor and related it to ContactID1 of Table 1). [/QUOTE]
Verification
Post reply
Home
Forums
Newsgroups
Microsoft Access
Microsoft Access
With a Query in Access 2007, How can I Create This Query
Top