I have an Access Form with a drop down option for employees. the drop down using the following Row Source Query to retrieve the relevant data from an SQL database :-
"SELECT DISTINCT EmployeeID, Surname, FirstName, Junior FROM tbl_Employees WHERE (Junior = 1) ORDER BY Surname"
The above query retreives all the employees that are juniors; Within this dropdown I only want to include in the list employees that are juniors and that are based on a particular floor. I have in the VBA code the floor number.
How can I incorporate the VB Code (or a field on the form) into the Row Source Query?
"SELECT DISTINCT EmployeeID, Surname, FirstName, Junior FROM tbl_Employees WHERE (Junior = 1) ORDER BY Surname"
The above query retreives all the employees that are juniors; Within this dropdown I only want to include in the list employees that are juniors and that are based on a particular floor. I have in the VBA code the floor number.
How can I incorporate the VB Code (or a field on the form) into the Row Source Query?