Combo box list data. (1 Viewer)

MarkSimm

New member
Local time
Today, 19:50
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
 

charityg

Registered User.
Local time
Today, 19:50
Joined
Apr 17, 2001
Messages
634
cboName.rowsourcetype="value list"
cboName.rowsource="this;that;the other"

I think this should work.

~Charity
 

KeaganQuilty

Registered User.
Local time
Today, 16:20
Joined
Jun 28, 2001
Messages
51
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
 

MarkSimm

New member
Local time
Today, 19:50
Joined
Jul 10, 2001
Messages
5
Sorted, thanks dudes.
)

Mark
 

Users who are viewing this thread

Top Bottom