By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,222 Members | 1,129 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,222 IT Pros & Developers. It's quick & easy.

Print Dialog: Setup... Error

Expert 100+
P: 1,287
Ok, I'm sure someone has seen this before, but I can't find a solution.

When using DoCmd.RunCommand acCmdPrint, the Setup... button in the Print Dialog gives me a message box saying:
-------------------------------------------------------------------------------------
This action can't be carried out while processing a form or report event.
A macro specified as the OnOpen, OnLoad, OnClose, OnFormat, OnRetreat, OnPage, or OnPrint property setting contains an invalid action for the property.
When you click OK, an Action Failed dialog box will display the name of the macro that failed and its arguments.
-------------------------------------------------------------------------------------
When I do click OK, there is no other dialog box.

One user on another forum said s/he solved the problem by setting the report to PopUp, but that didn't work for me either.

Any ideas?
Feb 9 '09 #1
Share this Question
Share on Google+
6 Replies


DonRayner
Expert 100+
P: 489
@ChipR
Try moving your (DoCmd.RunCommand acCmdPrint) command to the on activate event for the report.
Feb 10 '09 #2

Expert 100+
P: 1,287
How would I accomplish this if I want to print from a Print button on the report itself?
Feb 10 '09 #3

DonRayner
Expert 100+
P: 489
I'm not sure about a button on a report but on a form it would be something like this.

Expand|Select|Wrap|Line Numbers
  1. DoCmd.OpenReport "ReportName", acViewPreview
  2. Dim rpt As Report
  3. Set rpt = Screen.ActiveReport
  4. With rpt
  5. Application.RunCommand acCmdPrint
  6. End With
You will probally have to massage it a bit, but it should get you started.
Feb 10 '09 #4

Expert 100+
P: 1,287
I'll give it a try. Thanks :)
Feb 10 '09 #5

NeoPa
Expert Mod 15k+
P: 31,419
Where did you get to with this Chip?

I would expect a problem trying to run a Print when the report is already in a print process essentially (opening has an option for PrintPreview mode). I would expect problems trying to print when open. This is just logical thinking though. I make no claim to any great experience in this area.
Feb 16 '09 #6

Expert 100+
P: 1,287
Haven't worked with this yet, but I hope to. Right now I'm working on the detailed user's guide to my application, along with a couple other assignments. No fun :(
Feb 17 '09 #7

Post your reply

Sign in to post your reply or Sign up for a free account.