Runtime Error 2501 - openform action was canceled (1 Viewer)

sodochartaigh

New member
Local time
Today, 10:55
Joined
Jan 9, 2012
Messages
2
Hi there,
Should be relatively simple one this, but its just not working.
We've upgraded from 2003 to 2007 in our office, and have many links to reports that need to be printed. The code is fairly simple:

DoCmd.OpenReport "RiskAssess", acViewNormal
printcode

Trouble is I get the "Runtime error 2501 - openform action was canceled" error. Double clicking on the guilty report in the navigation gives the following error

"The expression On Open you entered as the event property setting produced the following error: A problem occurred while Microsoft Office Access was communicating with the OLE server or ActiveX Control"

This now occurs for all reports in the database.

Can anyone shed some light as to why our once-working reports now do not work? I've checked the syntaz and apparently the command shouldn't be any different

Thanks

Jim
 

Trevor G

Registered User.
Local time
Today, 10:55
Joined
Oct 1, 2009
Messages
2,341
Welcome to the Forum Jim,

If you are getting an ActiveX Object message have you checked the VBA code screen and References to see if anything is Missing since the Upgrade?
 

sodochartaigh

New member
Local time
Today, 10:55
Joined
Jan 9, 2012
Messages
2
Hi Trevor,
Thanks for the reply. I'm not sure what the referencces were before the upgrade, but I've just ticked all the ActiveX references and I still get the same error.

The entire error says:
"The expression On Open you entered as the event property setting produced the following error: A problem occurred while Microsoft Office Access was communicating with the OLE server or ActiveX Control"
it also says:
*The expression may not result in the name of a macro, the name of a user-defined function or [Event Procedure].
*There may have been an error evaluating the function, event or macro

when I click on the Help, it shows:
This error occurs when an event has failed to run because Microsoft Office Access cannot evaluate the location of the logic for the event. For example, if the OnOpen property of a form is set to =[Field], this error occurs because Access expects a macro or event name to run when the event is fired.

Jim
 

Trevor G

Registered User.
Local time
Today, 10:55
Joined
Oct 1, 2009
Messages
2,341
Jim,

Can you upload a sample of the database, no data needed so I can take a look.
 

Users who are viewing this thread

Top Bottom