Update form field for employee ID based on combobox name value (1 Viewer)

mzanovec

New member
Local time
Today, 13:40
Joined
Sep 27, 2015
Messages
2
Hi all:
I have a very simple database with 2 tables: database and namelookup. I am setting up a data entry form so that someone can enter data on employees. I have a combobox (cboName) on a form, and based on that value, I want the employeeID field to automatically populate based on the name.

I have tried many different ways to do this and the latest way is close -- the employeeID field populates correctly based on the FIRST value of employee entered, but it does not update if you change the employee name.

The previous statement is based on the following:

cboName - row source: SELECT [namelookup].[id], [namelookup].[Name] FROM namelookup ORDER BY [Name];

ID - control source: =DLookUp("id","namelookup","name=cboname")

Thanks everyone for your help!
 

mzanovec

New member
Local time
Today, 13:40
Joined
Sep 27, 2015
Messages
2
Thank you @pbaldy!
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 11:40
Joined
Aug 30, 2003
Messages
36,125
Happy to help and welcome to the site!
 

Users who are viewing this thread

Top Bottom