Using ComboBoxes

ccg_0004

Registered User.
Local time
Today, 15:23
Joined
Mar 12, 2008
Messages
41
Hi all! Stupid question I think but I have been going in circles for a while now.

On a form there's a combobox that retrives AutoID and LocationName from the Location table.

In the table underlying the form, the combobox named "Location" stores the autoID from the combobox. I would like the LocationName to be stored instead.

I think it has something to do with the Bound field but I cannot finger it out. I understand how to change the data view of the table to a query recordset, but I would rather just have the value saved instead.

Should I use a invisible text field on the form to populate the table instead?
 
That's a terrible idea. That would be breaking the rules of normalization and it will cost you grief and heartache down the road.

You'd be better off working in Excel.
 
In the table underlying the form, the combobox named "Location" stores the autoID from the combobox. I would like the LocationName to be stored instead.

Your setup is correct, you should be storing the autoID and not the location name. If you store the location name there are several disadvantages, what if the location name changes its name? ... you will end up changing that name in all your records ... that is one example how you will run into problems as georgedwilkinson rightly said.
 

Users who are viewing this thread

Back
Top Bottom