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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic Control Array

Status
Not open for further replies.

striker73

MIS
Jun 7, 2001
376
US
Is it possible to create a dynamic control array in Access? I know you can in VB. Thanks in advance!
 
I asked about this quite some time ago and was told that I could not use a control array. I kept trying and never found a way so I would say no.
In my case I needed to change properties for a large number of controls on forms.
I was advised by one of the bright guys (These guys are great) here to use something like this:

dim ctrl as controls
For Each ctrl In Me.Control
If (ctrl.ControlType = acTextBox) Then
If ctrl.Tag = "1" Then
ctrl.Enabled = True
ctrl.Locked = False
ctrl.BackColor = vbWhite
End If
End If
Next ctrl

Once I decided to use my head to think with instead of battering down brick walls with it, I went back ad changed all the goofy code I had to variations of this. Worked well for what I needed Terry (cyberbiker)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top