cdthurman
asked on
Control Arrays in Access VBA
Is it possible to create a control array in Access VBA?
If so can somebody tell me how to do it?
If so can somebody tell me how to do it?
ASKER
There is no Index property in VBA that I have seen...
Not in VBA, in the form that you are putting the controls on. It is a property of the control itself. You can then use VBA to manipulate the elements.
M@
M@
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
When you create your form add the control you want to be an array to it. Click on that control and set its Index property to 0. This tells Access that it will be an array. You can then create as many elements of that control in the array with this VBA code:
Load MyControl(1)
Load MyControl(2)
...etc...
M@