2-colums Combobox , after selecting show one colum

J

jac

Hey,

I have a 2-colums combobox (when opening the combobox via the arrow I see a
list with 2 columns).
But after selecting a value (list disappears and you see only selected row)
, it shows me only the bounded colum value and not the second column.

Is it possible to show both colums in the selected area of the combobox?

tkx
 
D

Douglas J. Steele

No, it's not.

However, you can easily copy the additional columns into text boxes on the
form if you want.

You'd put code in the combo box's AfterUpdate event:

Private Sub MyCombo_AfterUpdate()

Me!MyTextBox = Me!MyCombo.Column(1)

End Sub

That would put the 2nd column of the currently selected row in MyCombo into
text box MyTextBox (the Column collection starts counting at 0)
 
J

jac

Thanks, that is working.
But when I scroll in the records (with the form) which event I have to use
when a new record is shown? (another record has other values to show)


Also, I have the following :

Private Sub Form_Activate()
Me.Text29 = Me.coverage_sys_key.Column(1)
Me.Text31 = Me.prem_source_type.Column(1)
Me.Text32 = Me.life_cover_status.Column(1)
End Sub

the first one (text29) is working and the rest don't work. I don't see why
 
Top