Naming / archiving a saved report

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello:

I've used the "Output To" macro in the past to save reports in RTF format.
The problem that I have is that the data in the database is purged and
reloaded between reports. If I use the default report name I'll just be
overwriting the report each time. This is not good for my archiving goal.
Each report is unique.

I need to know if there is a way I can either (1) prompt the user the give
the report a unique title each time or (2) have the report name itseld based
on two feilds in the database table, or (3) if anyone has any other
suggestions on this.
 
Hello:

I've used the "Output To" macro in the past to save reports in RTF format.
The problem that I have is that the data in the database is purged and
reloaded between reports. If I use the default report name I'll just be
overwriting the report each time. This is not good for my archiving goal.
Each report is unique.

I need to know if there is a way I can either (1) prompt the user the give
the report a unique title each time or (2) have the report name itseld based
on two feilds in the database table, or (3) if anyone has any other
suggestions on this.

Here is an example using OutputTo that adds the month and year to the
file name.

DoCmd.OutputTo acOutputReport, "ReportName", acFormatRTF,
"C:\Documents and Settings\Owner\Desktop\" & Format(Date, "mmm yyyy")
& " Sales"

The name of the report this month becomes "Aug 2006 Sales"

You could also use an Input Box (though it is susceptible to spelling
and syntax errors):

DoCmd.OutputTo acOutputReport, "ReportName", acFormatRTF,
"C:\Documents and Settings\Owner\Desktop\" & InputBox("Enter New file
name")
 
Back
Top