View Full Version : look up table data from combo box


dakotus
10-04-2001, 07:14 AM
Hello,

I got a table called "Employee info" with employee id's and names and other info. I want users to (from a form/switchboard) select the employee name from a drop down menu and after the name is selected, an "frmEmployeeInfo" FORM opens up at the name they selected. Some of the data on the form should be locked (like the employee name to prevent spelling errors) There is a way to do this. How?

jstutz
10-04-2001, 10:41 AM
IN the AfterUpdate event of your drop down, you could write something like:

---------------------
docmd.openform "frmEmployeeInfo", , acNormal,, "[employeeID] = " & me.cmbName

with forms!frmEmployee
!controlname1.enabled = false
!controlname2.enabled = false
!controlname3.enabled = false
end with

Forms!frmEmployeeInfo!firstcontrol.SetFocus
---------------------

This will open your frmEmployeeInfo form with the proper employee on it, plus disable controls 1 thru 3 and set the focus to the first control you want your user to be able to edit.

js

dakotus
10-08-2001, 06:22 PM
I am still not understanding.
Could anyone else give a suggestion?