[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Access 2003 - run-time error 2501

Posted on 2007-07-30
3
Medium Priority
?
936 Views
Last Modified: 2008-01-09
We are getting an error message when trying to run one of our access files.  The error message reads: "Run-time error 2501 - The OpenReport action was canceled"  -- when I click on debug it brings me to the following line of code:
            DoCmd.OpenReport stDocName, acViewPreview

This report runs fine when we remote into work from home.  I am not familiar with visual basic code so any help would be appreciated before I have to call out the person that wrote this code.  What is confusing is it runs fine when accessed from the girl's computer from home.  I have uninstalled and re-installed Office2003 Pro and applied SP2.  
Any help is appreciated.  Thank you.
0
Comment
Question by:mmj1
  • 2
3 Comments
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 1000 total points
ID: 19595155
Here is a typical example where that error occurs, which may help you track it down:

You have button which opens a report ..
   DoCmd.OpenReport "YourReport"

But ... the report has No Data ... and in the OnOpen event of the report, you have a message box that pops up and says "Sorry, no Data"  if the NoData property = Truen ... and then you Cancel the opening of the report. Back at the Open command ... you will the get the message ""You cancelled the previous operaton".

So ... you have to trap that error around the OpenReport command.

So ... maybe this example will help you track it down?

mx
0
 

Author Comment

by:mmj1
ID: 19691655
Thank you for your help.  It ended up being an issue with the installation of Windows and/or Office.  I re-installed Windows and Office on one of the computers and the database runs fine.  Thank you for your help.  
0
 
LVL 75
ID: 19692614
you are welcome.

mx
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
If you’re using QODBC to update QuickBooks data from Microsoft® Access but Access is not showing the updated data, you could have set up QODBC incorrectly.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question