Results 1 to 4 of 4

Thread: Groups (2003)

  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Warrington, Cheshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Groups (2003)

    I'm playing with groups and probably don't understand fully what they are.
    I've grouped together a number of controls on a form. When I play with the properties of the group, if I select Visible = No the whole group disappears; I would like to use this facility, but the group doesn't appear to have a name. How can the visible attribute for the group be set/unset in VBA, please? (Or can't it?)
    Thanks
    Silverback
    Silverback

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Groups (2003)

    I don't think you can do what you are trying to do. When you select some grouped controls on a form the property box says "multiple selection".

    If I am wrong on this, someone else might chime in with a correction.
    Regards
    John



  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Groups (2003)

    You could set the Tag property of a "group" of controls to a unique name, say "silverback", and use it like this:

    Dim ctl As Control
    For Each ctl In Me.Controls
    If ctl.Tag = "silverback" Then
    ctl.Visible = False
    End If
    Next ctl

    Tag is a text property of all controls that is not used by Access itself for any specific purpose, so you can use it for your own purposes.

  4. #4
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Warrington, Cheshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Groups (2003)

    Sorry for delay in answering. I've used the code in my solution posted here
    Many thanks
    Silverback
    Silverback

Posting Permissions

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