How to saved value from a combobox

  • Thread starter Thread starter Alain
  • Start date Start date
A

Alain

Hi to All,

I would like to know how to save the showed value from a combobox (Alcan)
into a field in a table, not the key that is attached to the value (22). The
showed values come from my tblCompanyNames table and the info need to be
stored in my tblCompanies table .
The need for this is that when I open my form, the user will search for the
proper info by the company name, which will come from my tblCompanies, if
the info is not there then the user create a new recordset with the new info
a new combobox will be visible, info from the tblCompanyNames, and then
populate the rest of the fields with the new info. The reason of the
tblCompanyNames is that the same company can have multiple addresses

Thanks

Alain
 
Hi,


An Access Combo Box, we can have multiple columns (not all necessary
visible), so you can "push" the column you want. In the After Update event
subroutine of the combo box:

Me.OtherControl = Me.ComboBoxName.Column( i )


where the column count starts at 0.


Hoping it may help,
Vanderghast, Access MVP
 
Back
Top