Dynamic naming of Output-To files

  • Thread starter Thread starter MerrillTOsterman
  • Start date Start date
M

MerrillTOsterman

I want to dynamically set the file name of an output file
using the "Output To" action in MS Access macro.
Basically, I want to use the "Output To" action, and the
output file name would be today's date concatenated with a
customer name concatenated with standard file name....

eg. the output file name would be "c:\customer
records\Dec21ABCCorpQuarterlySales.rtf"

Any ideas how I might supply a variable to the "Output
File" argument in the "Output To" action and save the file
without prompting the user for the output file destination?

Many thanks.
 
Switch from using a macro to using VBA code, and it's trivial.

The command in VBA is something like:

DoCmd.OutputTo acOutputReport, "CompanyReport", acFormatRTF, strOutputFile

where strOutputFile is a variable containing the full path name.
 
Back
Top