Results 1 to 2 of 2
  1. #1
    Newbie11 is offline Advanced Beginner
    Windows 2K Access 2003
    Join Date
    Dec 2011

    Cancel Error

    I have a report that is run off a query. Before opening the report the user has to enter in a date parameter. If the user choses to abort the report (by selecting cancel) a Run-time error 2501 appears.

    Is there anyway to avoid this? A user may click a report by accident and thus chose not to run it and I want to give them the option to cancel without having an error.

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Nevada, USA
    You can trap for the error:
    Paul (wino moderator)
    MS Access MVP 2007-2019

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

Similar Threads

  1. Yes/No/Cancel Message Box
    By lynnmc26 in forum Access
    Replies: 0
    Last Post: 04-01-2011, 07:26 PM
  2. VBA to cancel a macro
    By GraemeG in forum Programming
    Replies: 1
    Last Post: 03-26-2011, 04:50 PM
  3. Cancel new record
    By oakoen in forum Forms
    Replies: 11
    Last Post: 12-18-2010, 09:26 AM
  4. Yes No Cancel MsgBox
    By Rick West in forum Forms
    Replies: 5
    Last Post: 04-14-2010, 08:57 AM
  5. Cancel listbox selection
    By vba-dev in forum Access
    Replies: 0
    Last Post: 10-26-2009, 12:18 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 - Senior Forums