combobox additem action

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In VB code, I am using additem.
In a combobox, in design view when using queries, we can have 2 columns and
1 as a default value.

In code how can I add 2 strings in a combobox in two columns, and second
one as a default value. (when 1 write cmb1.value, second column value should
return)

thanks
 
I am using cmb1.additem str1

With the above I am adding str1 to column 1. How can I add a value to column
2?
 
Either of these steps will add the value of str1 variable to the first
column in the combo box:
cmb1.additem str1
or
cmb1.additem str1, 1

To add to the second column,
cmb1.additem str2, 2

See Help for more details.
--

Ken Snell
<MS ACCESS MVP>
 
Back
Top