View Full Version : Save to file in access97


Sam Summers
01-06-2004, 12:14 PM
Is it possible to save a report to file in Access97?
I can do this already in access 2002

Thank you in advance

llkhoutx
01-06-2004, 07:36 PM
What you want is the

"DoCmd.OutputTo"

command. Lookup the argumnets under the Access "Help" menmu.

Sam Summers
01-07-2004, 11:56 AM
I am using:-

DoCmd.OutputTo acReport, stDocName, acFormatRTF, , False

which works in Access 2002 but when i convert the database to Access 97 it no longer works?

llkhoutx
01-07-2004, 12:19 PM
Your code

DoCmd.OutputTo acReport, stDocName, acFormatRTF, , False

should be changed to

DoCmd.OutputTo acOutputReport , stDocName, acFormatRTF, , False

It clearly states that in the Access Help when you search on "outputto' (without the quotes).

With the 3rd argumnet blank, you user will be prompted for a (folder and) file name. I programmatically specify a default folder and file use the common dialog to let the user select the folder and file.

Sam Summers
01-07-2004, 12:30 PM
Thanks very much,

I'll try that

Bechert
04-23-2004, 09:49 AM
IIkhoutx, can you explain how you programmatically integrate the OutputTo command with the command dialog so the user can choose where to save the file?

Thanks,
Bill Echert
Your code



should be changed to

DoCmd.OutputTo acOutputReport , stDocName, acFormatRTF, , False

It clearly states that in the Access Help when you search on "outputto' (without the quotes).

With the 3rd argumnet blank, you user will be prompted for a (folder and) file name. I programmatically specify a default folder and file use the common dialog to let the user select the folder and file.