Link to home
Start Free TrialLog in
Avatar of cdthurman
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?
Avatar of willcode4coffee
willcode4coffee

It is...almost

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@
Avatar of cdthurman

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@
ASKER CERTIFIED SOLUTION
Avatar of EDDYKT
EDDYKT
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial