Results 1 to 7 of 7
  1. #1
    EddieN1 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2011
    Posts
    313

    Hiding/Showing a Group of Controls

    I have a report with a number of fields (text boxes and labels) that, based on conditions, I want to make visible or not. Is there a way I can include all the controls in some sort of group so I can set the Visible property off or on for the "group" without having to refer to every control individually?

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    You can try the Tag property out. Perhaps assign the same value to each of the control's Tag property.

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Then you need code in relevant section Format event that cycles through all the controls and checks the Tag property. How many controls are involved?

    Why is visibility an issue? Even if the controls are not visible, the space is still occupied and this will mean empty area on report.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #4
    EddieN1 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2011
    Posts
    313
    Thanks, I have some totals that I want to print in Page Footer so they will be at the same place, however, on a multi-page ticket, I want the totals only on the last page of the ticket. I have already solved this by hiding the controls on Group Header, then un-hiding them in Group Footer. Thanks anyway.

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Placing the controls in report footer did not serve?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #6
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Also, you can determine if you are on the last page by using the .Page and .Pages methods in an If Then statement.

  7. #7
    EddieN1 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2011
    Posts
    313
    Thanks, but the "report" is really a batch of job tickets. I want totals at the end of each Job, not at the end of all jobs. Initially, I just had it in the Job Footer, but this caused the totals to appear in different positions depending of the number of details. I want the totals to always appear at the same distance from the page bottom. Thanks again.

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

Similar Threads

  1. Form events and showing/hiding controls
    By Monterey_Manzer in forum Forms
    Replies: 2
    Last Post: 03-26-2013, 03:01 PM
  2. Replies: 0
    Last Post: 02-25-2013, 04:43 PM
  3. Showing/Hiding Navigation Buttons in VBA or Macro
    By chris.williams in forum Forms
    Replies: 3
    Last Post: 11-15-2011, 10:38 AM
  4. Hiding controls
    By gg80 in forum Forms
    Replies: 3
    Last Post: 05-21-2011, 03:21 PM
  5. Multiple image controls isn't showing
    By Jamy in forum Reports
    Replies: 0
    Last Post: 02-23-2010, 04:55 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