View Full Version : Display 3 fields in a combo box after update


skelley
09-08-2000, 05:42 AM
Have a combobox that lets user see 3 fields in a pull down list. After he selects the right item from the list based on the three values, I can only display the first value. How can I get the other two fields to display?

Jack Cowley
09-08-2000, 07:25 AM
Dim A as Variant
Dim B as Variant
Dim C as Variant

A = Me![ComboBoxName].Column(0)
B = Me![ComboBoxName].Column(1)
C = Me![ComboBoxName].Column(2)

Put this in the After Update event and then A, B and C will hold the values in the three fields in the combo box. If you have fields on the form to display the selections then this will work instead of the above code:

Me![FieldName1] = Me![ComboBoxName].Column(0)
Me![FieldName2] = Me![ComboBoxName].Column(1)
Me![FieldName2] = Me![ComboBoxName].Column(2)

HTH,
Jack