Combo Box

HL

Registered User.
Local time
Today, 17:41
Joined
Feb 13, 2001
Messages
19
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
 
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
 
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.
 

Users who are viewing this thread

Back
Top Bottom