help with adding items to a listbox with access 2000

raiden_9123

New member
Local time
Today, 09:41
Joined
Oct 19, 2002
Messages
6
Hi,

I am trying to use the additem method to add strings to a list box based on the data in an array, but it does not seems to like the additem method. This method works in Access 2002, but I need to use Access 2000.

I basically want to load all of the string values in an array into the list box on their own separate line within the list box.

Please help me

Thanks
Raiden
 
Dim stRowSource as String
Dim i as Integer

For i = 0 to Ubound(arrayname) - 1
strRowSource = strRowSource & ";" & arrayname(i)
Next i

listbox.RowSourceType = "Value List"
listbox.RowSource = strRowSource



Where arrayname is the name of your array and listbox is the name of your listbox control
 

Users who are viewing this thread

Back
Top Bottom