Listbox

The Cleaner
08-24-2001, 09:53 PM
how do you add items to a list box in Access?

(the lstName.Additem "wow", indexvalue in VB)

"A movement starts here and ends there. But a revolution keeps going around and around."

Thinker
08-24-2001, 10:05 PM
You have to use the RowSource property of the Listbox. First, you need
to set the RowSourceType = "Value List". Then you can assign the
RowSource, separating the lines with a ;
List0.RowSource = "'Line1';'Line2';'Line3'"

I think therefore I am... sometimes right. images/icons/wink.gif

The Cleaner
08-24-2001, 10:50 PM
OK, got it. thanks

how would one go about having a list box being sorted automatically.... alpahbetically? I don't see it in the control properites

"A movement starts here and ends there. But a revolution keeps going around and around."

Thinker
08-24-2001, 11:47 PM
I can't find a way to sort an unbound listbox (with values supplied to
the rowsource.) With a listbox that comes from a query, the sort is part
of the query. Sorry

I think therefore I am... sometimes right. images/icons/wink.gif

The Cleaner
08-25-2001, 12:14 AM
OK.... thats what i thought. I guess you would i have to do it programmatically. Thanks for the help



"A movement starts here and ends there. But a revolution keeps going around and around."

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum