A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

An Opposite Report



 
 
Thread Tools Display Modes
  #1  
Old May 6th, 2010, 11:08 AM posted to microsoft.public.access.reports
Ant
external usenet poster
 
Posts: 65
Default An Opposite Report

Hello, and thanks in advance for your help.

I have three tables in my database as follows:

1. Employee - self explanatory
2. Qualfications - a list of licences, certificates, endorsements
3. Employee/Qualification Join - to link the various types of work
qualifications each employee has.

From this I have created two reports that show:

1. For each employee, the qualifications they hold and the expiry dates of
those qualifications
2. For each qualifictation, which employees have them.

MY PROBLEM IS....

I was just asked to create a report that lists the employees that don't have
a particular qualification. For example, print the list of employees that
don't have a first aid certificate.

I have tried various queries, but have had no luck. Any suggestions.

Regards
Ant
  #2  
Old May 6th, 2010, 01:21 PM posted to microsoft.public.access.reports
Allen Browne
external usenet poster
 
Posts: 11,706
Default An Opposite Report

Time to delve into subqueries.

See the "Identifying what is NOT there" section of this article:
http://allenbrowne.com/subquery-01.html#NotThere

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.


"Ant" wrote in message
...
Hello, and thanks in advance for your help.

I have three tables in my database as follows:

1. Employee - self explanatory
2. Qualfications - a list of licences, certificates, endorsements
3. Employee/Qualification Join - to link the various types of work
qualifications each employee has.

From this I have created two reports that show:

1. For each employee, the qualifications they hold and the expiry dates of
those qualifications
2. For each qualifictation, which employees have them.

MY PROBLEM IS....

I was just asked to create a report that lists the employees that don't
have
a particular qualification. For example, print the list of employees that
don't have a first aid certificate.

I have tried various queries, but have had no luck. Any suggestions.

Regards
Ant


  #3  
Old May 6th, 2010, 03:41 PM posted to microsoft.public.access.reports
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default An Opposite Report

Try this --
SELECT Employee
FROM (tblEmployee LEFT JOIN [Employee/Qualification] ON tblEmployee.EmpID =
[Employee/Qualification].EmpID) LEFT JOIN tblQualfications ON
[Employee/Qualification].QualID = tblQualfications.QualID
WHERE tblQualfications.Qualfication = "First Aid" AND
tblQualfications.QualID Is Null
ORDER BY Employee;

--
Build a little, test a little.


"Ant" wrote:

Hello, and thanks in advance for your help.

I have three tables in my database as follows:

1. Employee - self explanatory
2. Qualfications - a list of licences, certificates, endorsements
3. Employee/Qualification Join - to link the various types of work
qualifications each employee has.

From this I have created two reports that show:

1. For each employee, the qualifications they hold and the expiry dates of
those qualifications
2. For each qualifictation, which employees have them.

MY PROBLEM IS....

I was just asked to create a report that lists the employees that don't have
a particular qualification. For example, print the list of employees that
don't have a first aid certificate.

I have tried various queries, but have had no luck. Any suggestions.

Regards
Ant

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:21 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.