Topics Search


Views: 73
Can you specify a sheet name in the DoCmd.OutputTo command when trying to export multiple reports to multiple sheets in the same excel file? If yes, what is the syntax?
Sponsored Links:

More topics


DoCmd.OutputTo AcFormatPDF

I'm trying to use DoCmd.OutputTo to save a report as a PDF file. The trouble I'm having is that it seems to ignore the formatting set in VBA. In this case if a certain condition is true thePageHeader is hidden, the problem is that DoCmd.OutputTo prints that header even if the condition is true.

Is there a way around it? Am I missing something?

Filter a report in DoCmd.OutputTo

How do you filter a report you use in

DoCmd.OutputTo acOutputReport, "reportName", .

I can filter a report in DoCmd.OpenReport

DoCmd.OpenReport "reportName", acViewNormal, , "[fieldname]=" & "whatever"

The DoCmd.OutputTo doc says that if you leave the Objectname parameter blank it will use the active object. Is there a way to make the report I want to use the active object, filter it then call DoCmd.OutputTo ?

Docmd.Outputto not working

I am trying to create a image from an Access report. This report has a chart on it. My Docmd.Outputto code doesn't seem to work right. I've tried

DoCmd.OutputTo acOutputReport, "rptNode", acFormatRTF, "C:\My Documents\rptNode.rtf"

DoCmd.OutputTo acOutputReport, "rptNode", acFormatHTML, "C:\My Documents\rptNode.htm"

and the results are empty. Can you see anything obviously wrong with my code? I am a newbie with Docmd.Outputto.

I have attached mock-up database with this problem in it. The 2 statements above are included preceded by Stop's. Click on the button. These statements are supposed to create an image with rptNode on it. (I only need one.) Do they work for you? You may need to change the file path.

outputto challenge

In VBA I'm trying to export 2 reports of my dbase as snapshots to a folder where users have access to.

The code I use:

DoCmd.OutputTo acOutputReport, "whatever", acFormatSNP, "T:\whatever.snp"
DoCmd.OutputTo acOutputReport, "whatever_1", acFormatSNP, "T:\whatever_1.snp"

The problem is that the second outputto never runs.
It only executes the first one, not the second.

However when I put this code in a button script it does work.

My problem is that I do not want to press a button to achieve this, the reports should automatically be saved as snapshots each time the dbase is run.

Has anyone have the same problem with docmd.outputto.&gt

docmd.outputto messages

Has anyone had any success suppressing the "now outputting" dialog boxes you get with docmd.outputto

I have got close, but the best I can do is to flick up what looks like an empty dialog box, which immediately disappears.

from 2005! is there any way to do this that can be incorporated into VBA?

docmd.transferspreadsheet crashes access

I am having some trouble with the docmd.transferspreadsheet function, everytime I run it, it crashes Access. I have used the docmd.outputto function and that works fine but I need the queries to be in the same excel file but in different sheet and the docmd.outputto open a new excel file for each query.


I have tried to display an error message but Access just freezes and I get the program not responding message |

DoCmd.OutputTo, 2007 - 2000

I have some code, working in Access 2007.
I want it to work in Access 2000 also.

The export from a table works fine:
DoCmd.OutputTo acOutputTable, "Data", acFormatXLS, , -1

The export from a query does work in Access 2007 but not in Access 2000:
DoCmd.OutputTo acOutputQuery, "Temp_N_Code", acFormatXLS

Creating PDFs with Docmd.OutputTo

When printing reports directly to PDFs using "Docmd.OutputTo" some lines (inside graphics) appear dashed. When the report is opened and printed to Adobe PDF or when the report is queued directly to a printer, the lines are not dashed.

(I even tried opening the report first and then using the option within "Docmd.OutputTo" to print the active object, but tono avail.)

Attached is an image of two graphics- the left image does not show any dashed effect, while the right one does. The effect is much more pronounced when printed.


I use DoCmd.OpenReport and the Load event code gets executed. But if I use DoCmd.OutputTo, the Load event does not fire. I want that Load code to fire when I output the report without opening it.

DoCmd.OpenReport with a Filter??

From eRed the Noobe :-)

I have a report that I am trying to save as a PDF using DoCmd.OutputTo

This code properly saves the report:

DoCmd.OutputTo acOutputReport, "LTCFarNF", acFormatPDF, "M:\ARMGR\Reports\" & Me.ltcfname.Value & Chr(34) & ".pdf", True

However, I need to filter the report. The code below properly lets me preview the report:

DoCmd.OpenReport "LTCFarNF", acViewPreview, , "[LTCFarNF].[ltcfname]=" & Chr(34) & Me.ltcfname.Value & Chr(34)

How can I apply the filter/where to the DoCmd.OutputTo