Pete Printer
Registered User.
- Local time
- Today, 09:00
- Joined
- Jul 28, 2014
- Messages
- 15
Hello Folks
I have a form that shows open tasks with date and qualification.
There is a sub form showing available staff and their qualifications.
Staff that are assigned to a task by adding to a many to many table.
The sub form checks that staff are available on that date by checking the availability table and the fact they are not in the booked table on the same date.
The sub form is linked master and child field by date.
There are two values for staff qualification 1 or 2.
The sub form is queried with the below SQL statement which works fine.
It shows staff available by date and qualification.
SELECT qryallStaffAvail.stAvID, qryallStaffAvail.avDate, qryallStaffAvail.STName, tblStaff.qual, qryallStaffAvail.staffId
FROM (qryallStaffAvail LEFT JOIN Booked ON qryallStaffAvail.stAvID = Booked.stAvIDFK) INNER JOIN tblStaff ON qryallStaffAvail.staffId = tblStaff.staffId
WHERE (((tblStaff.qual)=[Forms]![frmBookings]![Qual]) AND ((Booked.stAvIDFK) Is Null));
However staff qualified at 1 can undertake all tasks at both qualification I and qualification 2.
Staff qualified at level 2 can only be assigned to qualification 2 tasks.
I have tried program flow options with IFF and this fails as being too complex.
I hope that i have explained this clearly and welcome any advice or guidance.
Thanks for looking at this
Pete
I have a form that shows open tasks with date and qualification.
There is a sub form showing available staff and their qualifications.
Staff that are assigned to a task by adding to a many to many table.
The sub form checks that staff are available on that date by checking the availability table and the fact they are not in the booked table on the same date.
The sub form is linked master and child field by date.
There are two values for staff qualification 1 or 2.
The sub form is queried with the below SQL statement which works fine.
It shows staff available by date and qualification.
SELECT qryallStaffAvail.stAvID, qryallStaffAvail.avDate, qryallStaffAvail.STName, tblStaff.qual, qryallStaffAvail.staffId
FROM (qryallStaffAvail LEFT JOIN Booked ON qryallStaffAvail.stAvID = Booked.stAvIDFK) INNER JOIN tblStaff ON qryallStaffAvail.staffId = tblStaff.staffId
WHERE (((tblStaff.qual)=[Forms]![frmBookings]![Qual]) AND ((Booked.stAvIDFK) Is Null));
However staff qualified at 1 can undertake all tasks at both qualification I and qualification 2.
Staff qualified at level 2 can only be assigned to qualification 2 tasks.
I have tried program flow options with IFF and this fails as being too complex.
I hope that i have explained this clearly and welcome any advice or guidance.
Thanks for looking at this
Pete