Updating two table fields with one combo box

  • Thread starter Thread starter Shawn
  • Start date Start date
S

Shawn

I have a form which records assignments for employees in
a table (tblassignments). On the form, the block for
assigning an employee is a combo box which displays the
employee's name and employee number from the employee
table (tblemployees). The employee's name is then saved
in the corresponding field on the assignment table
(tblassignments). How can I get the employee number from
the combo box to save in the employee number field in the
table?

Thanks for any help?

Shawn
 
I have a form which records assignments for employees in
a table (tblassignments). On the form, the block for
assigning an employee is a combo box which displays the
employee's name and employee number from the employee
table (tblemployees). The employee's name is then saved
in the corresponding field on the assignment table
(tblassignments). How can I get the employee number from
the combo box to save in the employee number field in the
table?

I would strongly suggest that you do NOT store the employee's name in
the assignments table at all. Names are not unique; and they can
change. You're using a relational database - use it relationally!

Store the unique EmployeeID in the table, by using it as the Control
Source of the combo; and when you need to see that employee's name,
use a query to look it up by joining tblEmployees to the query, or by
using a combo box which stores the ID but displays the name.
 

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

Similar Threads

Combo box & Search Function 3
combobox question 3
missing info from form 2
Help Plz... 4
Combo Box 2
Creating Unique Front End 1
Problem with Items Selected from List Box 2
Need Help... 5

Back
Top