Printing the conents of an array into a list box

chrisbrooke

New member
Local time
Today, 11:51
Joined
Sep 4, 2003
Messages
9
Thanks for the help on the last one, Ive got an array that I want to display the results of. I know theres a way by setting the row source type to a function (using the function out of the help files - that show how to display 4 mondays in advance) but im struggling with the actual intergration of the array that holds my data into the the acLBGet Value part. Any ideas?? Thanks in advance.
 
Chris,

This will populate a listbox with an array's elements:

Code:
Dim ptr As Long
Dim MyArray(100) As Long

Me.ListBox.Rowsource = Mid(Str(MyArray(1),2))
For ptr = 2 to 100
   Me.ListBox.Rowsource = Me.ListBox.Rowsource & "; " & Str(MyArray(1),2)
   Next ptr
Me.ListBox.Requery

Wayne
 

Users who are viewing this thread

Back
Top Bottom