View Full Version : Combo Box


louiserome
10-03-2001, 06:32 AM
Is there any way that from displaying 2 columns of data in a combo box, both can be stored?

Any help would be greatly appreciated

shacket
10-03-2001, 06:37 AM
Not directly - a combo box can only be linked to one field.

However, you could use the AfterUpdate event to update the 2nd field or another control on your form linked to the 2nd field and accomplish the same thing.

I am wondering why you would want to do this...? http://www.access-programmers.co.uk/ubb/smile.gif

paulmcdonnell
10-03-2001, 09:17 AM
2 colums in a combo box....

set your column selection to a query or sql statements which reports on two columns

Set your column widths to 2 and column count to 2 in the format tab.

to update two colums in the table your updating use the after update event of the combo box.

e.g.
Me.[app-Address_1] = Me.Company.Column(1)
Me.[app_address_2] = Me.Company.Column(2)

where me.company.column(n) is my combo box name and me.app_address_n is the field in the table to be updated.

Hope this helps mate

Paul

Rich
10-03-2001, 11:38 AM
Why would you want to store two fields in another table and duplicate existing data?