Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 393887
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T16:18:07+00:00 2026-05-12T16:18:07+00:00

can’t believe I am losing so much time on this one. I have an

  • 0

can’t believe I am losing so much time on this one.

I have an order form, and when I click on a button “reports”, a dialog
pop ups with a list of different reports to chose from. Double-clicking selects
and starts the correspondent report.

On one of these reports, there is an unbound text box I need the user to enter data with.
The ControlSource of this field is set to its Name property.
When the report is started, an input box appears with an OK and a Cancel button. Whenever I enter some data, all is fine.

But when I click on Cancel, the app crashes and I get an errormessage:
“Runtime Error 2501: The Action OpenReport has been canceled” (translated from German).

The Report is called through this code:

DoCmd.OpenReport vBerichtName, nAnsicht
End If   

On Error Resume Next
  DoCmd.Close acForm, "F_BerichtDrucken"
On Error GoTo 0

1) Why does the error handling not kick in?
2) I googled and found lots of weird solutions for this, like the official Microsoft one saying you need to install/update a printer driver (come on…). None helped.

I am doing this for a friend and I normally work on linux/php,java, etc. I apologize if the solution is somewhat obvious or something like that.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T16:18:08+00:00Added an answer on May 12, 2026 at 4:18 pm

    Ditto to Phillipe’s answer. you didn’t give us the whole procedures but you need to do something like this…

    Sub MyButton_Click
    On Error Goto myError
    
    DoCmd.OpenReport vBerichtName, nAnsicht
    
    
    MyExit:
       Exit Sub
    
    MyError:
       If Err.number = 2501 then goto myExit
       msgbox err.description
       goto myExit
    
    End Sub
    

    This is a common error but you can catch it like any other error and ignore it if is 2501.
    Seth

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can I order my users in the database, so I don't have to say
Can I write this with less code, also is .click(function preferred for mobile or
Can any one help me in sorting this out in sed/awk/perl Input file Start
Can't get over it, no matter how much I search. I have AlarmManager, where
Can someone tell me what I am doing wrong? This is my first time
Can I make this link in a href format ( ahref ='...' )? <form
Can any one tell, how to get the result of LINQ query contains group
Can we change the default action of the edit selected row button? Here is
Can I be sure about the order in a Python dictionary? The function op.GetTangent(id)
Can anyone explain to me why this program: for(float i = -1; i <

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.