SaveAs

  • Thread starter Thread starter Eva
  • Start date Start date
E

Eva

Hi
I have Module that prints out reports for me. there is command:
DoCmd.Save
How can I change to SaveAs?
(I would like put there a path so it saves as:C:/My Documents

Thanks
 
Have you tried
DoCmd.RunCommand acCmdSaveAs

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
Hi Eva,

You need to specify what type of output that you want to create, such as a
Snapshot file (*.snp), Rich Text, HTML, etc. Check out the OutputTo method of
the DoCmd object. For example, the following line of code with output a
report named Invoice to the same folder as the database, written to a file
named Invoice.snp:

DoCmd.OutputTo acReport, "Invoice", acFormatSNP, _
CurrentProject.path & "\" & "Invoice.snp"

You can, of course, substitute a string variable for the hardcoded
"Invoice", such that you pass the name of a report to output to a file with
the same name.


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
__________________________________________
 
Back
Top