N
Nick Del Vecchio
In an employee database, I would like to be able to go to a record
from a combobox showing the employee's supervisor
There is a table called tblEmployees with fields
EmployeeID
LastName
Supervisor
The form has the following fields
Employeeid
EmployeeName
SupervisorID is a combo box that shows the Employee Name and
EmployeeID
etc
When I am looking at an employeeid, I can pick the supervisor for that
employee and have it displayed in the combo. The combo displays the
name and id but is bound to the name.
What I would like to do is double click the name in the combo and have
the form go to that record that was in the combo box.
I've tried many variations of something like this that doesn't work
DoCmd.OpenForm "frmEmployees", , , "EmployeeID=" & Me.[Forms]!
[frmEmployees]![SupervisorID].Column(2)
this doesn't work either
DoCmd.GoToRecord "[EmployeeID] = " & [Forms]![frmEmployees]!
[SupervisorID].Column(2)
Any ideas?
from a combobox showing the employee's supervisor
There is a table called tblEmployees with fields
EmployeeID
LastName
Supervisor
The form has the following fields
Employeeid
EmployeeName
SupervisorID is a combo box that shows the Employee Name and
EmployeeID
etc
When I am looking at an employeeid, I can pick the supervisor for that
employee and have it displayed in the combo. The combo displays the
name and id but is bound to the name.
What I would like to do is double click the name in the combo and have
the form go to that record that was in the combo box.
I've tried many variations of something like this that doesn't work
DoCmd.OpenForm "frmEmployees", , , "EmployeeID=" & Me.[Forms]!
[frmEmployees]![SupervisorID].Column(2)
this doesn't work either
DoCmd.GoToRecord "[EmployeeID] = " & [Forms]![frmEmployees]!
[SupervisorID].Column(2)
Any ideas?