View Full Version : Combo Box


HL
03-22-2001, 03:11 AM
Can anyone help!!!!!

I have created a Combo box which has two columns, the second column is bound to a text box.

Is there anyway that I can select the information from the two sets of columns in the combo box and then have the information entered into two different text boxes.

HL

axa
03-22-2001, 03:44 AM
You can access the data contained in all columns/rows in a combobox using the Column property of the combobox.

This property takes 2 arguments: Col, and Row (which is optional), both of which are 0 based indexs to the columns and rows.

If you leave off the Row argument, it defaults to the currently selected row in the combobox.

Example: if i wanted the value in the second column of the currently selected row in a combo box i could do this:-

MyVar = cboMyCombo.Column(1)

if you want to directly load the value to a text box, then...

txtMyTextbox = cboMyCombo.column(1)


Hope that helps

axa

Pat Hartman
03-22-2001, 04:23 PM
It's ok to display the extra columns in unbound textboxes. However, it is incorrect to store anything but the "key". You can always retrieve the additional columns via a join in a query.