Results 1 to 4 of 4
  1. #1
    Thomas 1958 is offline Novice
    Windows 10 Office 365
    Join Date
    Mar 2022
    Posts
    8

    Sub report not running Event Procedure


    I created a simple Report and On Load/On Current it runs an [event Procedure] with an If-Then to control the visible property of a few data fields. If I run this portion by itself, it seems to work fine.

    However, when I embed it into a larger Report as a sub routine it will not run until I click within the subroutine.

    New to the forum, suggestions welcome for better posting.
    Tom

  2. #2
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    suggest posting code with proper indentation - please enclose in code tags (# button on posting toolbar) - always appreciated.
    You run it ok how? Cursor in code and press F5? What does 'embed in a larger report as a sub routine' mean? That means the report is a subreport on another report?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Use Detail section OnFormat or OnPrint event to control visibility of controls when multiple records are retrieved. However, these events do not run for ReportView.

    An alternative is an expression in textbox to return Null if condition is met.
    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
    Thomas 1958 is offline Novice
    Windows 10 Office 365
    Join Date
    Mar 2022
    Posts
    8
    Print Preview did the trick! thanks!!

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

Similar Threads

  1. Replies: 2
    Last Post: 11-27-2021, 08:33 AM
  2. Replies: 1
    Last Post: 09-27-2019, 10:58 AM
  3. Event procedure
    By vugar in forum Access
    Replies: 3
    Last Post: 09-09-2014, 11:36 PM
  4. Replies: 1
    Last Post: 03-29-2014, 07:46 PM
  5. Replies: 3
    Last Post: 05-07-2012, 12:17 PM

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