Combo Box question...

J

Joe

I have a combo box where I want to programmatically set the values. In
Access 2003 it's easy. cboBox.AddItem, however in Access 2000 that isn't an
option. I
know that this is possible, but for the life of me I can't remember how to
do it.

Any assistance would be greatly appreciated.

Thanks.
 
D

Dirk Goldgar

Joe said:
I have a combo box where I want to programmatically set the values.
In Access 2003 it's easy. cboBox.AddItem, however in Access 2000
that isn't an option. I
know that this is possible, but for the life of me I can't remember
how to do it.

If the combo's RowSourceType property is "Value List" (as would be
required to use AddItem in A2003), you can set the RowSource directly to
a delimited string. For example,

Me!MyCombo.RowSource = "Item 1;Item 2;Item 3"

But if a combo's list might change at run time, I prefer to use a table
or query for the rowsource.
 
Top