Methodikal
New member
- Local time
- Today, 13:41
- Joined
- Nov 7, 2022
- Messages
- 17
Hi,
I have a Form with a subform.
The top or main form is Employees. The subform is called Teleworking.
I have Two Employee Tables in Relationship with PositionID as a primary key pointing to ReportsTo as a Foreign Key to create join since some Employees are supervisors.
On the Employees table I have a field named IsSupervisor (Yes/No - Checkbox) and a field named IsTeleworking (Yes/No - Checkbox).
I am creating a form to Enter in work schedules for Employees that telework.
On the form I wish to create a combobox that has the Supervisors names and filters the form to only provide the Employees of the supervisor selected that are teleworking.
The subform collects the Schedule.
On the Teleworking Table the EmployeeID is saved with the record.
My question is... How would I create the combobox to show only the Supervisor's FirstName and LastName while filtering the form?
I assume the combobox row source would use a sql statement; however, I'm a Noob.
Maybe something like:
SELECT DISTICT [EmpFirstName], [EmpLastName] From tblEmployee WHERE IsSupervisor=Yes;
Then the After-Update would be some VBA. But honestly I have no idea what the heck to do.
Can anyone please help?
I have a Form with a subform.
The top or main form is Employees. The subform is called Teleworking.
I have Two Employee Tables in Relationship with PositionID as a primary key pointing to ReportsTo as a Foreign Key to create join since some Employees are supervisors.
On the Employees table I have a field named IsSupervisor (Yes/No - Checkbox) and a field named IsTeleworking (Yes/No - Checkbox).
I am creating a form to Enter in work schedules for Employees that telework.
On the form I wish to create a combobox that has the Supervisors names and filters the form to only provide the Employees of the supervisor selected that are teleworking.
The subform collects the Schedule.
On the Teleworking Table the EmployeeID is saved with the record.
My question is... How would I create the combobox to show only the Supervisor's FirstName and LastName while filtering the form?
I assume the combobox row source would use a sql statement; however, I'm a Noob.
Maybe something like:
SELECT DISTICT [EmpFirstName], [EmpLastName] From tblEmployee WHERE IsSupervisor=Yes;
Then the After-Update would be some VBA. But honestly I have no idea what the heck to do.
Can anyone please help?