error code 2501

  • Thread starter Thread starter David
  • Start date Start date
D

David

i hv a access application. and some reports in the application cannot be
generated with error code 2501 given on some of PCs on the LAN, while they
are run okay on some other PCs. All these PCs system is the same, windowsxp.

any suggestion?

thanks!
 
Hi David

Is it the OpenReport method which is raising the error? If so, what it
means is that the process of opening the report has been cancelled by some
event. The two most likely events are the Open event and the NoData event.

Check your code to see if either of these events has an associated event
procedure which can set Cancel in some circumstance, then you should be able
to figure out how that circumstance has occurred.
 
David said:
i hv a access application. and some reports in the application cannot be
generated with error code 2501 given on some of PCs on the LAN, while they
are run okay on some other PCs. All these PCs system is the same, windowsxp.

any suggestion?

thanks!
 
Graham is correct. This error is usually generated by the code that has the
DoCmd.OpenReport call when something in the report cancels it's opening,
such as when there is no data and you've set up the NoData event to do this.
If that is what is happening, just place an error handler in the code that
opens the report to trap the error.
 
thanks, wayne & graham. however i don't think it's due to nodata, bcoz on
the some other PCs can open it by the DoCmd.OpenReport call, in fact, there
is data to generate the report.
 
Hi David

Are all the tables linked correctly on the troublesome PCs?

I suggest you set a breakpoint at DoCmd.OpenReport and step through the code
a line at a time (F8) to try to find where the event is being cancelled.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top