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!

Control Array

Status
Not open for further replies.

NoBugs

Programmer
Jun 30, 2003
8
US
I can set up a text box control array in vb. I need to set up one in access. I'm loading a public defined array with data and would like to fill a control array on a form from that public array.
[Private Sub ClearArray()
Dim intIndex As Integer
For intIndex = 0 To Ir1
Me.BTLINE(intIndex) = "" ' I'm getting a type mismatch here
Me.BTTRAV(intIndex) = ""

Next intIndex

End Sub]

Thanks,
TB
 
you can set all the objects into a collection of whatever type of object you have...and than loop through it that way.

in a sub prodecudre somewhere
dim mycollection as object 'you can define exactly what
object you want here
mycollection.add (name an object)
mycollection.add (name another object)
etc...


than you your procedure that you show up there you can loop through the collection using its index just like a control array

mycollection(intIndex) 'will reference the corresponding
object within the collection
 
Thank you for your quick response. I found another way to do what I was trying to do
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top