The Openreport action was canceled error (1 Viewer)

Ice Rhino

Registered User.
Local time
Today, 15:38
Joined
Jun 30, 2000
Messages
210
I have been using a database that I constructed for a while now and all is well with it. Well all was well with it until I went to use it today, having changed nothing, and now when I click on the Run Report cmd btn, I get the The Openreport action was canceled everytime.

Other people use this report/database and it works erfectly for them, it is only me it does not work for. The database was designed in 2003 although all other users only use Access 2000. File Format is in 2000 too.

Literally nothing has changed apart from the fact I have installed and Epson printer since the last time I used it, No Windows updates, Office Updates etc etc have been applied.

The basic code behind the button is

Private Sub cmd_btn_rep_1_Click()

On Error GoTo Err_cmd_btn_rep_1_Click

Dim stDocName As String

stDocName = "rpt_centre_dashboard"
DoCmd.OpenReport stDocName, acPreview
DoCmd.RunCommand acCmdFitToWindow

Exit_cmd_btn_rep_1_Click:
Exit Sub

Err_cmd_btn_rep_1_Click:
MsgBox Err.Description
Resume Exit_cmd_btn_rep_1_Click

End Sub

Anybody able to shed any light on this problem? One thing I have just noticed is that I am not even able to open the report in Design View. Nothing happens, machine just sits there doing nuffing

Regards

Toni
 
Last edited:
Local time
Today, 07:38
Joined
Aug 2, 2004
Messages
272
Assuming that you have stepped thru this code and any related code and still cannot find the problem....

Report or query or table upon which the report is based may be corrupt.

Try a compact and repair.

If still no go, create a new db, and import all objects from original db into the new db.

If still no go, try a decompile. BE CAREFUL. See links below for more info.

http://www.mvps.org/access/bugs/bugs0008.htm

http://www.granite.ab.ca/access/decompile.htm

If that fails, recreate the report (or try this first if the report is not too complex).

HTH

:cool:
 

Ice Rhino

Registered User.
Local time
Today, 15:38
Joined
Jun 30, 2000
Messages
210
Thanks for the suggestions, none of them worked though. I just don't get it. The fact taht I can't open the report in design mode says something to me but I don't quite know what

I will be honest, I don't really know alot about error trapping etc so would not really know how to step through the code etc

The only thing I have not tried is the recreation of the report, it is massively complicated so I guess a bloody long night is ahead of me

Thanks for the ideas though. Nice to know I can step away from this board for a good period of time and on my return the responses rec'd are still as prompt and informative.

Toni
 
Local time
Today, 07:38
Joined
Aug 2, 2004
Messages
272
OK. One last shot.

This may be a printer issue. When you say you installed an Epson printer, are you sure that you installed the proper drivers? Maybe try a re-install.

Have you set the new printer as the default printer. Is the printer setup in Access as the printer to use?

I really think this may be your issue. I would work on this before trying to re-create a very complex report. I'd hate for you to spend all that time for nothing.
 

Ice Rhino

Registered User.
Local time
Today, 15:38
Joined
Jun 30, 2000
Messages
210
Hi

I deffo installed the correct drivers, however, thanks to System Restore I took the system back to the settings prior to installing it and all is well again

Phew!!!! thank the maker

Thanks for all your help on this one sfreeman, much appreciated

Toni
 

Ice Rhino

Registered User.
Local time
Today, 15:38
Joined
Jun 30, 2000
Messages
210
sfreeman, I find it funny that your signature states that asking the right question is 90% of it when you consider that my original post stated "Literally nothing has changed apart from the fact I have installed and Epson printer since the last time I used it, No Windows updates, Office Updates etc etc have been applied"

Just goes to show that your signature is right, asking the right question and 90% and the right info is I guess the other 10%

Regards

Toni
 

jc_dubya

New member
Local time
Today, 10:38
Joined
Jan 2, 2007
Messages
1
Re: The Openreport action was canceled

I find that reporting problems often have to do with the default printer. Try changing the default printer (before opening access) to the one used when creating the report (the reports seem to bind to the printer somehow)

Regards


Ice Rhino said:
I have been using a database that I constructed for a while now and all is well with it. Well all was well with it until I went to use it today, having changed nothing, and now when I click on the Run Report cmd btn, I get the The Openreport action was canceled everytime.

Other people use this report/database and it works erfectly for them, it is only me it does not work for. The database was designed in 2003 although all other users only use Access 2000. File Format is in 2000 too.

Literally nothing has changed apart from the fact I have installed and Epson printer since the last time I used it, No Windows updates, Office Updates etc etc have been applied.

The basic code behind the button is

Private Sub cmd_btn_rep_1_Click()

On Error GoTo Err_cmd_btn_rep_1_Click

Dim stDocName As String

stDocName = "rpt_centre_dashboard"
DoCmd.OpenReport stDocName, acPreview
DoCmd.RunCommand acCmdFitToWindow

Exit_cmd_btn_rep_1_Click:
Exit Sub

Err_cmd_btn_rep_1_Click:
MsgBox Err.Description
Resume Exit_cmd_btn_rep_1_Click

End Sub

Anybody able to shed any light on this problem? One thing I have just noticed is that I am not even able to open the report in Design View. Nothing happens, machine just sits there doing nuffing

Regards

Toni
 

tjw6150

Registered User.
Local time
Today, 07:38
Joined
Feb 3, 2011
Messages
10
I'm getting the same error code: OpenReport action was canceled. After I opened the report in design mode to have a look around, I decided to change the date format; one of my coworkers had trouble with =Date() so I changed it. Then I was able to run the report. Closed the program then came back to it. Same problem with the exact same report. Monkeyed around with the page nos. then ran it without error. Closed the program. Opened again. Same problem. I don't want to have to monkey around with the format everytime I want to run this report. Any ideas? Thank you in advance.

UPDATE 4/6/2011: Now I don't have to even edit the report in design view. All I have to do is open the properties for the report in design view, view the event procedure On Open (just look at it!), then close and save the report. Then it works fine! How stupid is that?
 
Last edited:

arnetegel

New member
Local time
Today, 07:38
Joined
Jul 26, 2011
Messages
1
Iam having the same error: OpenReport action was canceled.

The funny thing is that if i press debug and just LOOK at the code, and then close the editor and run again, it works.

But then i close the database and open again i get the same error.
Dont really know what to do..

Best regards
Mikael
 

edwardsj89

New member
Local time
Today, 16:38
Joined
Jul 5, 2013
Messages
1
I had the same error and the cause of my error was because I was running a 64bit version of Access when the original code and DB was done in 32bit.
 

rudger

New member
Local time
Today, 15:38
Joined
Mar 28, 2016
Messages
5
I know I am reviving an old thread but just incase any searches show this result up.

Be aware that by default windows 10 changes your default printer to your last used printer. I have a report that prints to a Dymo Label printer and it caused another report to come up with this error as a result.
 

rattler418

New member
Local time
Today, 08:38
Joined
Oct 10, 2016
Messages
1
I had the same error and the cause of my error was because I was running a 64bit version of Access when the original code and DB was done in 32bit.

5 Years late, but this solved my issue. It is unbelievable how obscure this issue was. No amount of modifications to error handling made any difference.

After seeing this response, I realized that the database I was using was built in 32-bit Access, and i was running it in 64-bit Access. Moved the db to another computer with 32-bit Access, and had zero issues.

Thanks edwardsj89 for this.
 

alexf

New member
Local time
Today, 10:38
Joined
Nov 30, 2023
Messages
1
Almost 20 years later and print drivers still kill the report option if you have a bad driver! Appreciate the help.
 

Users who are viewing this thread

Top Bottom