[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 456
  • Last Modified:

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?
0
cdthurman
Asked:
cdthurman
  • 2
1 Solution
 
willcode4coffeeCommented:
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@
0
 
cdthurmanAuthor Commented:
There is no Index property in VBA that I have seen...
0
 
willcode4coffeeCommented:
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@
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now