E
Em
I have an new Employee entry form. I have a combo box to
choose the department. I would like a text box to display
the manager of that department once the user selects the
department, however this control is unbound, it's just for
information.
Code for combo box:
SELECT DISTINCTROW [tbl_Department].[DEPT_ID],
[tbl_Department].[DEPT_NAME] FROM [tbl_Department];
The combo box control source is emp_dept.
I have the control source of the text box (txtSupervisor)
set to:
=(SELECT [tbl_employee.emp_lastname] & ", " &
[tbl_employee.emp_firstname] AS Name FROM tbl_Department
INNER JOIN tbl_Employee ON tbl_Department.DEPT_MANAGER =
tbl_Employee.EMP_ID WHERE (((tbl_Department.DEPT_ID)=
[forms]![frm_newemployee]![cbodepartment]))
This query runs fine if I just run it in the query
designer.
When I run the form I get a #NAME? error.
Any ideas?
choose the department. I would like a text box to display
the manager of that department once the user selects the
department, however this control is unbound, it's just for
information.
Code for combo box:
SELECT DISTINCTROW [tbl_Department].[DEPT_ID],
[tbl_Department].[DEPT_NAME] FROM [tbl_Department];
The combo box control source is emp_dept.
I have the control source of the text box (txtSupervisor)
set to:
=(SELECT [tbl_employee.emp_lastname] & ", " &
[tbl_employee.emp_firstname] AS Name FROM tbl_Department
INNER JOIN tbl_Employee ON tbl_Department.DEPT_MANAGER =
tbl_Employee.EMP_ID WHERE (((tbl_Department.DEPT_ID)=
[forms]![frm_newemployee]![cbodepartment]))
This query runs fine if I just run it in the query
designer.
When I run the form I get a #NAME? error.
Any ideas?