Results 1 to 2 of 2
  1. #1
    Gan is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Dec 2013
    Posts
    8

    Don't want report to run when there are no records that meet the criteria

    I have a report that I do not want to execute in cases if there are no records that meet the criteria. It returns a blank record if the criteria i not met and it prints garbage.


    Thanks for your help.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Generally in the report's no data event:

    Cancel = True

    and you need to trap for the resulting error in the code that opens the report:

    http://www.baldyweb.com/ErrorTrap.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Only show records that meet criteria
    By RussH in forum Reports
    Replies: 9
    Last Post: 04-10-2013, 05:25 AM
  2. Replies: 1
    Last Post: 01-30-2013, 03:27 PM
  3. Query for records that do not meet criteria
    By survivo01 in forum Queries
    Replies: 3
    Last Post: 12-16-2012, 05:45 PM
  4. Replies: 2
    Last Post: 11-28-2012, 10:47 AM
  5. Summing when no records meet criteria
    By clew3 in forum Queries
    Replies: 6
    Last Post: 11-05-2012, 11:37 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