Control Arrays in Access VBA

Posted on 2004-11-24
Last Modified: 2010-05-02
Is it possible to create a control array in Access VBA?
If so can somebody tell me how to do it?
Question by:cdthurman
    LVL 4

    Expert Comment

    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)


    Author Comment

    There is no Index property in VBA that I have seen...
    LVL 4

    Expert Comment

    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.

    LVL 26

    Accepted Solution


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Introduction While answering a recent question ( in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
    The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now