S
Shanin
I have two queries that I would like to combine the results. Actually I have
one query I'd like to join with multiple others. I have a database that
tracks trainings, so there is a tblEmployees, tblTrainings, and
tblTrainingList (this one just has a list of all trainings that need to be
taken). I have one query that compares what an employee has taken and what
they haven't and shows what they still need to take, here is the code:
SELECT [LastName] & "," & [FirstName] AS Name, T2.Training, T1.DateHired
FROM tblEmployees AS T1, tblTrainingList AS T2
WHERE (((T2.Training) Not In (SELECT DISTINCT Training FROM tblTraining
WHERE EmployeeID = T1.EmployeeID)) AND ((T1.Separated)=No)) AND
(T1.TrainingsRequired)=Yes
ORDER BY [LastName] & "," & [FirstName]
WITH OWNERACCESS OPTION;
I have several other queries that allow you to view trainings that will
expire within a date range, or training by employee, by supervisor, etc. The
only bad thing about these is it will onlyl show those trainings they
currently have date in for and will not show those they have yet to take.
Here is an example of the one by employee:
SELECT [FirstName] & " " & [LastName] AS Name, tblTraining.Training,
tblTraining.DateTaken, tblTraining.DateExpires,
IIf([DateExpires]<Date(),"yes") AS Late, tblTraining.SignedUp,
tblTraining.PreviousDueDate, tblTraining.[DateTurnedIn/Taken]
FROM tblEmployees INNER JOIN tblTraining ON tblEmployees.EmployeeID =
tblTraining.EmployeeID
WHERE (((tblEmployees.EmployeeID)=[Forms]![TrainingbyEmployee]![Combo0]))
WITH OWNERACCESS OPTION;
Is there anyway I can get the results from my first query to also be in
these others, so if someone looks by employee, it will show all, even those
they haven't taken, or if they search by date range, it will still list those
that employees have not taken?
Thanks
one query I'd like to join with multiple others. I have a database that
tracks trainings, so there is a tblEmployees, tblTrainings, and
tblTrainingList (this one just has a list of all trainings that need to be
taken). I have one query that compares what an employee has taken and what
they haven't and shows what they still need to take, here is the code:
SELECT [LastName] & "," & [FirstName] AS Name, T2.Training, T1.DateHired
FROM tblEmployees AS T1, tblTrainingList AS T2
WHERE (((T2.Training) Not In (SELECT DISTINCT Training FROM tblTraining
WHERE EmployeeID = T1.EmployeeID)) AND ((T1.Separated)=No)) AND
(T1.TrainingsRequired)=Yes
ORDER BY [LastName] & "," & [FirstName]
WITH OWNERACCESS OPTION;
I have several other queries that allow you to view trainings that will
expire within a date range, or training by employee, by supervisor, etc. The
only bad thing about these is it will onlyl show those trainings they
currently have date in for and will not show those they have yet to take.
Here is an example of the one by employee:
SELECT [FirstName] & " " & [LastName] AS Name, tblTraining.Training,
tblTraining.DateTaken, tblTraining.DateExpires,
IIf([DateExpires]<Date(),"yes") AS Late, tblTraining.SignedUp,
tblTraining.PreviousDueDate, tblTraining.[DateTurnedIn/Taken]
FROM tblEmployees INNER JOIN tblTraining ON tblEmployees.EmployeeID =
tblTraining.EmployeeID
WHERE (((tblEmployees.EmployeeID)=[Forms]![TrainingbyEmployee]![Combo0]))
WITH OWNERACCESS OPTION;
Is there anyway I can get the results from my first query to also be in
these others, so if someone looks by employee, it will show all, even those
they haven't taken, or if they search by date range, it will still list those
that employees have not taken?
Thanks