Option Compare Database

G

Gwen

I am trying to set up a database form in which the person filling out
the form can select a name and the employee number and skills that
they have attained show up automatically. I have the id number
filling in but I do not know how to set up the skills appearing in a
drop down box. Does anyone have any ideas.
I have all my tables connected by EmployeeID.

This is how I set up the employee number showing up:

Private Sub InvolvedEmployeeName_Change()
On Error GoTo Commanderror
'Subroutine will automatically lookup employee number
'and put it in text box when a name is selected.

Dim db as DAO.Database
Dim rst as DAO.Recordset

Set db = CurrentDb
Set rst = db.OpenRecordset ("tblEmployee", dbOpenDynaset)

rst.MoveFirst
Do While Not rst.EOF

If rst![EmployeeID] = Me![InvolvedEmployeeName] Then
Me![InvolvedEmployeeNumber] = rst![EmployeeNumber]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top