Results 1 to 6 of 6
  1. #1
    EES is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    5

    Pausing OpenReport


    Greetings to all - first time post so here i go
    I have a couple of questions (for which search results show up zero):

    This is a database created for school report cards. Teachers enter the details via a form and reports are run for the printing side of things.

    1. In order to provide an 'on screen print preview' for the teacher, I am using macros on a form button (i know nothing about VB) to open the reports for a selected student and up to 15 reports will open (for the various subjects).
    Is there a way to pause it after each one opens so the teacher doesn't have 15 reports open on screen at a time?
    I am looking to have only one open at a time and the next report will open when the reader closes the currently open report.

    2. For some students, not all reports will have been completed (via the form). When the preview button is clicked to open the 15 or so preview reports, how do i get it to ignore (and thus, not open) any report that is blank?

    Any help is much appreciated ..
    Kind regards

  2. #2
    ketbdnetbp is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Midwest
    Posts
    254

    Ees -

    Haven't used this in A2010 but, in A2003 there is a NoData Event that occurs after the report is formatted. Try searching the NoData Event and the OnNoData property in Access/VB Help. Normally, these are used to cancel the printing of a report that contains no data but, I think you may be able to close the report as well.

    Hope this gets you started.

    All the best,

    Jim

  3. #3
    EES is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    5
    Thanks for your reply, Jim. I had a look at that but couldn't get it working yet - prob something im getting wrong in the macro, but i'll keep at it.
    Certainly gives me something to aim at ..

    Thanks again!

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    I don't use macros, only VBA. But suppose could do following with macros. Have macro open first report. Have buttons on other reports, each will close open report and then open the next one in the series. Report must be viewed in ReportView for buttons to be enabled and run code in their Click event. Complication is if report doesn't open because of no data. Will need code to automatically open next report in this case.
    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
    EES is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    5
    Thanks June7. I had thought about that but the reports need to be 'previewed' so the user can see what they'll get from the printer.

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Okay, then maybe the Close event of the report could have the code to open next report or in a custom print button on the QAT or ribbon. Open report in PrintPreview, send to printer with the printer driver dialog or custom button, close report by X on the report or automatically in the custom button and run next report.

    Google: VBA pause code
    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.

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

Similar Threads

  1. error 3071 on OpenReport command
    By degras in forum Reports
    Replies: 5
    Last Post: 02-15-2011, 10:40 AM
  2. DoCmd OpenReport ... where condition with a Like
    By Grooz13 in forum Programming
    Replies: 4
    Last Post: 08-31-2010, 09:04 AM
  3. Pausing macro execution
    By lupis in forum Programming
    Replies: 3
    Last Post: 06-28-2010, 12:46 AM
  4. OpenReport function
    By grad2009 in forum Access
    Replies: 8
    Last Post: 05-22-2010, 10:43 AM
  5. Pausing a Macro
    By Rick West in forum Programming
    Replies: 0
    Last Post: 03-17-2010, 10:29 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