Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Manchester, Gtr Manchester, England
    Posts
    299
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Resume after error (2000/XP)

    I have a routine that prints(previews) 3 reports in turn (for a selected record).

    The reports have Cancel=True in Report_NoData which causes error 2501 'Open report was cancelled.'

    I'm catching this in the error handler but the routine then exits - I want the code to continue running on the line after the one that caused the error.

  2. #2
    5 Star Lounger
    Join Date
    Apr 2003
    Location
    Hampshire, United Kingdom
    Posts
    602
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Resume after error (2000/XP)

    Add <span style="background-color: #FFFF00; color: #000000; font-weight: bold">Resume Next</span hi> on a new line at the end of your error handler.
    Waggers
    If at first you do succeed, you&#39;ve probably missed something.

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Manchester, Gtr Manchester, England
    Posts
    299
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Resume after error (2000/XP)

    <img src=/S/dizzy.gif border=0 alt=dizzy width=15 height=15> I've been staring at the screen too long. I thought that's what I had but I'd typed 'On Error Resume Next'

    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •