Capturing items from a Combo box

J

JJ

How do we code to capture all items in a combo box and store them to an array
? Is it possible ?

Thanks in advance.
 
D

Douglas J. Steele

For what purpose?

If the combo box is based on a table (or query), you've already got the data
in the table.

If the combo box is based on a value list, that value list can be retrieved
as the RowSource property of the combo box.
 
D

Douglas J. Steele

You don't need an array to know what value the user has chosen. You simply
need to refer to the control to see what value's currently selected in it.
 
G

George Nicholson

Since a combo box can only have one item selected, you can simply check the
value of the combo box. If you need to retrieve something other than the
bound field, incorporte the Combo's Column property in the retrieval.

If you were working with a multi-select List box, you'd have to write a
function that would loop through the ItemsSelected collection and make
additions to an array or concatenated string.

HTH,
 
J

JJ

Here's what I'm trying to do. After a user entered a value into a textbox,
that value would be trapped and check if it is already present in a table
column. If it is, a message would pop up to inform the user.
 
Top