You need the tables:
TblEmployee
EmployeeID
FName
LName
etc
TblHourlyRequiredClass
HourlyRequiredClassID
HourlyRequiredClassName
TblClassTakenByEmployee
ClassTakenByEmployeeID
EmployeeID
HourlyRequiredClassID
Create a standard query that includes TblEmployee and
TblClassTakenByEmployee. Join EmployeeID in both tables. Put the following
expression in the first field of the query:
Employee:[LName] & ", " & [FName]
Pull down HourlyRequiredClassID into the second field. Name the query,
QryEmployeeClasses.
Use the Wizard to create an unmatched query. Find HourlyRequiredClassID in
TblHourlyRequiredClass that is not in
QryEmployeeClasses. Match HourlyRequiredClassID in TblHourlyRequiredClass to
HourlyRequiredClassID in
QryEmployeeClasses. Include the field, Employee, in this query. Sort the
Employee field ascending. This query will give you a list of required
classes for each employee that they have not taken.
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com
Hey PC Datasheet,
Thanks for your reply.
I did create an unmatched query, but it didn't work right.
I have the query that has all employees training and am comparing it to
the
list of classes required. I want all classes that do not appear in the
employees training to show up after the query.
I did get some results, but they were incorrect. Here's the SQL:
SELECT qrytrainingall.Last, qrytrainingall.First, qrytrainingall.[Class
Name], qrytrainingall.[Employee Number]
FROM qrytrainingall LEFT JOIN tblHOURLYrequiredclasses ON
qrytrainingall.[Class Name] = tblHOURLYrequiredclasses.[Class Name]
WHERE (((tblHOURLYrequiredclasses.[Class Name]) Is Null));
Not sure what I'm doing wrong but sure I'm close,
John.
:
You should have a table of classes offered and a table that records the
classes employees have taken. Open the database window to queries and
click
on new. One of the choices is Find Unmatched Query Wizard. Use that
option
to create a query where you set the employee criteria for the employee
you
want and the query returns the classes in the classes offered table that
are
not in the table that records the classes the employee has taken. These
will
be the classes the employee has not taken.
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com
message
Hello,
I have a database that keeps track of employee training.
The main form contains the employees bio information, the subform
includes
their training( from a training table; they are both linked by
Employee
number.)
Employees have to take particular classes to ensure compliance with
regulations. Is there a way to compare the classes each student has
taken
with the standard requirements for that employee? ( We have about 4
types
of
employee) The class Name field in my training subform is a lookup to a
class
table, which just lists the classes offered.
Hopeful of a solution,
John.