Combo box list data.

MarkSimm

New member
Local time
Today, 15:20
Joined
Jul 10, 2001
Messages
5
I have a combo box on a form and I want to be able to change the value list items depending on certain user events.

I need to know....

Can you clear all of the list elements in a combo box (so it is empty) in the forms VBA script?

Can you add string items to the list in the forms VBA script?

Hope you can help

Mark
 
cboName.rowsourcetype="value list"
cboName.rowsource="this;that;the other"

I think this should work.

~Charity
 
To get the ComboBox Empty, use this syntax.

ComboBoxName.rowsource = ""

This makes for a pretty useless combobox however.

I use comboboxes in my tables all the time. The best way to change the values listed in them is to change the Rowsource property of the combobox.

i.e.

combobox.rowsource = "SELECT DISTINCTROW [Table/Query]![Field] FROM [Table/Query]"

Hope this helps you out.

Keagan Quilty
Kilbride, Newfoundland
 
Sorted, thanks dudes.
redface.gif
)

Mark
 

Users who are viewing this thread

Back
Top Bottom