473,383 Members | 2,005 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Print Dialog: Setup... Error

1,287 Expert 1GB
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
6 3620
DonRayner
489 Expert 256MB
@ChipR
Try moving your (DoCmd.RunCommand acCmdPrint) command to the on activate event for the report.
Feb 10 '09 #2
ChipR
1,287 Expert 1GB
How would I accomplish this if I want to print from a Print button on the report itself?
Feb 10 '09 #3
DonRayner
489 Expert 256MB
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
ChipR
1,287 Expert 1GB
I'll give it a try. Thanks :)
Feb 10 '09 #5
NeoPa
32,556 Expert Mod 16PB
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
ChipR
1,287 Expert 1GB
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

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

Similar topics

0
by: Rich Sweeny | last post by:
Hi, I am working in Mac OSX 10.3.7 with SDK 1.4_2. When my Print Dialog box comes up just about everything is disabled except selecting from the 4 printers I have and being able to set the page...
7
by: Robert Adkison | last post by:
I need to print a web page. It is my preference that my users just do a File/Print from explorer. That way my users will get the print dialog that will allow them to select the fax printer. The...
1
by: hamil | last post by:
I am trying to print a graphic file (tif) and also use the PrintPreview control, the PageSetup control, and the Print dialog control. The code attached is a concatination of two examples taken out...
2
by: larry | last post by:
I'm trying to print screen in my MFC application. I want to capture screen in OnBeginPrinting( ), but my program capture the print dialog box too. How can I hide print dialog box and just print...
0
by: Siv | last post by:
Hi, This is driving me nuts, I have created a custom print preview dialog, I have a toolbar at the top of the window that allows the user to select a page setup dialog and a printer dialog. All...
0
by: Michael Fay in SB | last post by:
A month ago I posted: "I built my application with Access 2003 and made a distribution using the Microsoft Office Access 2003 Developer Extensions. (I also install Jet 8 as a follow-on action at...
2
by: Brad Pears | last post by:
I have some sample code that uses the print dialog, print preview and a print direct options. If I select print preview and then click the printer icon from that, the document prints. If I...
1
by: dhanashivam | last post by:
Hi All, I have developed a VC+ dll file which provides a product key for my msi setup file. This VC++ dll work fine together with my setup file. but, my problem is, i have given a message box...
1
by: Tim Sprout | last post by:
I want to call Page Setup to set default printer and page size and orientation before batch printing pdf's silently from WebBrowser controls. I can print silently using DDE (the NDde library) or...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.