Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2009

    Unanswered: How to Hide a Group

    What I have is a form with many input fields, but instead of using a tab control because the color can't be changed I was going to overlay some field and use buttons on the right to hide and unhide some items depending on what button is pressed.

    So what I have done is I grouped some items, but there is no name for the group.

    How do I name the groupe so I can hide all items at once?


  2. #2
    Join Date
    Jun 2005
    Richmond, Virginia USA
    Provided Answers: 19
    You can use the Tag Property to 'group' your Controls. To change ALL tagged Controls, in the Tag Property, of all Controls of interest, enter TagThisControl, just like that, no Quotes.
    In the OnClick event, to make your 'group' invisible, Copy then Paste the following code:
    Dim ctrl As Control
             For Each crtl In Me.Controls
                If ctrl.Tag = "TagThisControl" Then ctrl.Visible = False
    If you want this formatting to persist, appropriate to the Current Record as you move from Record to Record, you'll need similar code in the Form_Current event, triggered by something.

    If a given Value in a given Control can tell Access when to hide these Controls, use that.

    Alternatively, you could have a Checkbox on the Form and when you click your Command Button to hide the Controls, you could set the Checkbox Value to Yes. Then, in the Form_Current event, check the Value of the Checkbox and hide/unhide your 'group' accordingly!

    Linq ;0)>
    Hope this helps!

    The problem with making anything that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  3. #3
    Join Date
    Sep 2009
    Thanks Mate

Posting Permissions

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