Results 1 to 5 of 5
  1. #1
    tstoneami is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    71

    Why is format event code running on the first record only.

    I have a report with several sub reports that run and fill a table conditionally. The third sub report displays the records from this table. It works perfectly.

    If I print a batch of records, it also works perfectly - but only for the first record. Previously, I had another report with several sub reports where the visibility of objects were controlled - this worked fine in a batch. Every subreport had the correct visibility settings.

    In this case, I have a similar design, but instead of setting visibility on the various subreports, I am filling a table based on data in the subreport. As stated it works great for the first one in the group, or any single print.



    Any ideas? Bottle of red for the first helpful answer!

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,623
    What do you mean by 'fill a table' and 'filling a table based on data in the subreport'? How does a report fill a table?
    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.

  3. #3
    tstoneami is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    71
    Based on the values in objects on the form another table is filled with relevent data in the format event using insert statements.

    So, when the batch finishes running I had hoped to have a table filled with the correct data for the final sub report on the report. But it only works for the first master record in the batch.

    I am probably going to attempt to fill the table before the report runs if this is just not do-able. It was a pretty convenient way of doing it though.
    Last edited by June7; 08-28-2013 at 05:12 PM. Reason: merge posts

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,623
    It may be doable but probably difficult. I've never even considered anything like it.

    Why save data that can be calculated when needed?
    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.

  5. #5
    tstoneami is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    71
    Jah, well, I am now going to try and fill a table before hand. Its not hard for a single record. ANyway, thanks.

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

Similar Threads

  1. Replies: 7
    Last Post: 05-28-2013, 09:11 AM
  2. Replies: 7
    Last Post: 03-15-2011, 11:14 PM
  3. running select query in form delete event
    By suki360 in forum Programming
    Replies: 0
    Last Post: 03-11-2011, 10:11 AM
  4. How to put code in form event.
    By rogdawg in forum Forms
    Replies: 4
    Last Post: 08-06-2010, 03:38 PM
  5. Replies: 1
    Last Post: 06-22-2010, 03:15 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