B
Brett Davis
Hello...
I am using Access 2003 and I am attempting to run this from a command
button:
CommandBars("Menu Bar").Controls("File").Controls("Page
Setup...").Execute
When I try to run this... I get this error message:
This action can't be carried out while processing a form or report event.
A macro specified as the OnOpen, OnClose, OnFormat, OnRetreat, OnPage, or
OnPrint property setting contains an invalid action for the property.
When I execute this:
CommandBars("Menu Bar").Controls("File").Controls("New...").Execute
or this:
CommandBars("Menu Bar").Controls("File").Controls("Close").Execute
It works!!!
I have the references set to Microsoft Office 12.0 Object Library. I have
also tried it with Microsoft Office 11.0 Object Library as well... the
command fails on both...
Please advise...
Thanks,
Brett
I am using Access 2003 and I am attempting to run this from a command
button:
CommandBars("Menu Bar").Controls("File").Controls("Page
Setup...").Execute
When I try to run this... I get this error message:
This action can't be carried out while processing a form or report event.
A macro specified as the OnOpen, OnClose, OnFormat, OnRetreat, OnPage, or
OnPrint property setting contains an invalid action for the property.
When I execute this:
CommandBars("Menu Bar").Controls("File").Controls("New...").Execute
or this:
CommandBars("Menu Bar").Controls("File").Controls("Close").Execute
It works!!!
I have the references set to Microsoft Office 12.0 Object Library. I have
also tried it with Microsoft Office 11.0 Object Library as well... the
command fails on both...
Please advise...
Thanks,
Brett