look up table data from combo box

  • Thread starter Thread starter dakotus
  • Start date Start date
D

dakotus

Guest
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?
 
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
 
I am still not understanding.
Could anyone else give a suggestion?
 

Users who are viewing this thread

Back
Top Bottom