Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting all items in a listbox as an array/collection 1

Status
Not open for further replies.

1DMF

Programmer
Jan 18, 2005
8,795
GB
Hi,

I can't seem to find the equivilent VBA option for .Items which seems to be available to VB listboxes?

is there one?

I was hoping I could do something like
Code:
me.myField = join(myListBox.Items,",")

Is the only way to loop them and manualy build the CSV string?




"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Google Rank Extractor -> Perl beta with FusionCharts
 
How are ya 1DMF . . .

Whats shown in access listboxes is determined by its [blue]Row Source[/blue] property ... which can be a query name, table name, or a semicolon delimited list.

Have a look at the property for more detail.

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
No, there is an addItem method and a removeItem method. Ensure it is set as a value list prior to adding.
 
I did it via loop in the end, seemed to be the simplest solution, for me anyway.

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Google Rank Extractor -> Perl beta with FusionCharts
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top