Results 1 to 3 of 3
  1. #1
    BRV is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2011
    Posts
    29

    Hide each control, control group or subform?

    I'm setting up a form that (depending on an option selected) will either show or hide some of the controls.

    There are about 30 usable controls, ranging from option groups to text boxes and command buttons. Also a bunch of other non-usable labels, lines etc.

    They will be hidden or shown in groups of roughly 1/3 of the total controls.

    My question is what would be considered best practice here:

    1) To set the controls in subforms



    2) To group the controls and use a For Each statement based on the .tag property

    3) To manually show/hide each control


    I believe that (1) would be the easiest, but I once read that subforms carry a lot of overhead. (2) would probably be my second choice, but carries more code than (1). I hope nobody says (3) since I'd sure not like to code all of that.

    Or, is there another, better choice?

    Suggestions are appreciated!

  2. #2
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Here is a 4th suggestion: make a rectangle box to cover all the controls with background the same color as the form. Do a Send To Front. Then hide and unhide just that one control - when you make it visible it should cover over all the controls under it and hide them.

  3. #3
    BRV is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2011
    Posts
    29
    Quote Originally Posted by aytee111 View Post
    Here is a 4th suggestion: make a rectangle box to cover all the controls with background the same color as the form. Do a Send To Front. Then hide and unhide just that one control - when you make it visible it should cover over all the controls under it and hide them.
    That's a good suggestion. I wonder though how that would work if the user tabbed through to the control.

    I'm also considering maybe disabling vs hiding, just so that the user doesn't see a big blank spot on the form.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Option Control to hide/show page tabs
    By tandridge in forum Forms
    Replies: 3
    Last Post: 12-08-2011, 10:15 AM
  2. Replies: 5
    Last Post: 11-16-2011, 07:30 PM
  3. Replies: 5
    Last Post: 10-13-2011, 03:36 PM
  4. Subform on tab control
    By mytfein in forum Forms
    Replies: 0
    Last Post: 07-12-2011, 10:14 AM
  5. Replies: 6
    Last Post: 03-14-2011, 09:37 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums