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?
6 3620 @ChipR
Try moving your (DoCmd.RunCommand acCmdPrint) command to the on activate event for the report.
How would I accomplish this if I want to print from a Print button on the report itself?
I'm not sure about a button on a report but on a form it would be something like this. -
DoCmd.OpenReport "ReportName", acViewPreview
-
Dim rpt As Report
-
Set rpt = Screen.ActiveReport
-
With rpt
-
Application.RunCommand acCmdPrint
-
End With
You will probally have to massage it a bit, but it should get you started.
I'll give it a try. Thanks :)
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.
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 :(
Sign in to post your reply or Sign up for a free account.
Similar topics
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
| |