combobox additem action

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
 
G

Guest

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?
 
K

Ken Snell [MVP]

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>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top