Page 2 of 2 FirstFirst 12
Results 16 to 17 of 17
  1. #16
    tstoneami is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    71
    I felt I owed this forum an answer. It was a tough go and in the end it turned out to be simple. The control states in the report don't return to their default initial setting on each report in the batch. So, because I am messing the the visibillity, as soon as I expose something it remains exposed for the entire run. The simple fix was to set all the controls invisible at the outset of the form event code:

    Dim ctlCurr As Control Dim booCondition As Boolean For Each ctlCurr In Me.Controls If ctlCurr.Tag = "Group1" Then ctlCurr.Visible = booCondition End If Next ctlCurr

    It also goes back to an earlier post about tags. In this use of tag I just use it to tag all the controls and set the visibility in one go.

    Thank you for any interest in helping me. June - this is the real issue.

    Troy

  2. #17
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Glad you found a solution.

    Interesting that in one of my tests it seemed that the visibility turned off/on for the entire dataset, which did surprise me. I saw it on for a record midway then the following records did not show it.

    I was thinking of an alternative to the VBA since it appears it is the label that you really need to make not show.

    Maybe use a textbox as the label and then an expression in ControlSource like:

    =IIf(IsNull([fieldname], "", "label text here")

    Eliminates VBA and report will render much faster.
    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.

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 27
    Last Post: 06-06-2013, 04:31 AM
  2. Replies: 1
    Last Post: 04-15-2013, 10:02 AM
  3. Criteria for Subreport
    By blazerboy6 in forum Reports
    Replies: 4
    Last Post: 08-09-2011, 12:46 PM
  4. Empty Subreport
    By runbear in forum Reports
    Replies: 5
    Last Post: 04-23-2011, 12:26 PM
  5. accurate currency values
    By eaanton in forum Access
    Replies: 1
    Last Post: 11-20-2008, 11:38 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