Selecting one value from a combo box but saving another value in a table

double2

Registered User.
Local time
Today, 05:59
Joined
Aug 7, 2009
Messages
13
I have a database designed to allow users to log staff absence and then query based on various criteria including large date ranges. At the moment, users select a staff name from a combo box and then enter the corresponding details.

An issue I have realised is in the case where a member of staff changes their name i.e. from marriage it will then make it difficult, if not impossible to query their past absence without searching by their old name and then their new one.

All staff are assigned a unique ID and this is already recorded within the "StaffData" therefore I am now looking for a way to reference all recorded absence by ID rather than name while still providing the user the ability to reference their entry by name when inputting.

Is there a way the value in a combo box can save a corresponding value from a query as the field data? I have spent a long while googling this issue but my main problem is that I am finding it very hard to concisely word my question!

Thanks in advance :)
 
Hi guys, I'm by no means trying to hurry anyone up, however I thought it may be worth mentioning that I literally just need to know what the name of this technique is (don't feel you need to explain the method if it's long winded).

If anyone can advise me of that, I will happily do my own research and post my findings back here for other people to reference.
 
Add the EmployeeID to the combo box and set that as the bound column. You can make it so that the column with the EmployeeID doesn't show by setting the Column Width for that column to 0.

You should be referencing the records by the EmployeeID anyways...you can see why using just the name can cause issues :)
 
Ahh well, when you put it like that! :D So simple. Thanks for your help!
 

Users who are viewing this thread

Back
Top Bottom