Results 1 to 6 of 6

Thread: Control Arrays

  1. #1
    Join Date
    Aug 2002
    Posts
    121

    Question Unanswered: Control Arrays

    Does Access 2000 support "control arrays"?


  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Haven't tried it..

    Arrays are generally of type "variant", which encompasses controls as well...

    At very worst, controls can be referenced by name, and you may create an array of control names for future use.

    What exactly is it that you need to do?

  3. #3
    Join Date
    Aug 2002
    Posts
    121

    Smile

    ThanksTed, that occured to me as well.

    I have a form with mutliple check boxes that require enabling (disabling) depending on how the user navigated to the form.



  4. #4
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    That may be best done with a sub...
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  5. #5
    Join Date
    Jan 2004
    Location
    Aberdeen, Scotland
    Posts
    1,067
    Just an Idea why don't you use a loop like this then you could check against an array of Names dependent on your situation, Just a thought

    Code:
        Dim aControl As Control
        
        For Each aControl In Me.Controls
            If TypeOf aControl Is CheckBox Then
                If aControl.Name Like "check*" Then
                    'do something
                    aControl.Value = True
                End If
            End If
        Next aControl
    Dave

  6. #6
    Join Date
    Aug 2002
    Posts
    121
    Thanks Dave... I've entertained that option.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •