Turn string into dropdown items.

  • Thread starter Thread starter Steven
  • Start date Start date
S

Steven

Is there a way to take a variable string like:

302;308;500;520;5657;8000; and make a combo box with

302
308
500
5657
8000

Thank you,

Steven
 
Use the RowSource property of a combo/list box value set to that. It needs
to be of the Value rowsource type though, not Table/Query

Me.Comboboxname.Rowsource = "this;that;somethingelse"

Access doesn't seem to care if there's a trailing semicolon (in 2k3 I tried
it anyway)

hth
--
Jack Leach
www.tristatemachine.com

"I haven't failed, I've found ten thousand ways that don't work."
-Thomas Edison (1847-1931)
 
Is there a way to take a variable string like:

302;308;500;520;5657;8000; and make a combo box with

302
308
500
5657
8000

Thank you,

Steven

Yes. Set the combo box's RowSourceType property to "ValueList" and its
RowSource property to the exact text string above.
 
Back
Top