J
John Kutsor
Good day,
I support an application developed using Microsoft Access
2002 and VBA. The application automatically generates
report files for logging purposes, then submits them to a
printer based on certain database events.
The report printing function looks something like this:
DoCmd.OpenReport strReportExt, acPreview, , strWherecls
DoCmd.OutputTo acOutputReport, strReportExt,
strFileType, strFilename, False
Set Application.Printer = Application.Printers
(strPrinter)
DoCmd.PrintOut
Set Application.Printer = Nothing
DoCmd.Close acReport, strReportExt, acSaveNo
where:
strReportExt is the report name
strWherecls is the where clause
strFileType is set to 'TXT' for now
strFilename is the report file name (for logging
purposes)
strPrinter is the print queue name on the server
After about 4 days and 10,000 processed reports, the
OutputTo method goes off the deep end. It starts to
generate a report file that actually has some report data
in it. However, it never closes the report file.
Instead, it appears to hang on the file open and continue
to pad the file with blank spaces until someone notices
the application is 'hung' or the server runs out of disk
space.
Any ideas?
John Kutsor
I support an application developed using Microsoft Access
2002 and VBA. The application automatically generates
report files for logging purposes, then submits them to a
printer based on certain database events.
The report printing function looks something like this:
DoCmd.OpenReport strReportExt, acPreview, , strWherecls
DoCmd.OutputTo acOutputReport, strReportExt,
strFileType, strFilename, False
Set Application.Printer = Application.Printers
(strPrinter)
DoCmd.PrintOut
Set Application.Printer = Nothing
DoCmd.Close acReport, strReportExt, acSaveNo
where:
strReportExt is the report name
strWherecls is the where clause
strFileType is set to 'TXT' for now
strFilename is the report file name (for logging
purposes)
strPrinter is the print queue name on the server
After about 4 days and 10,000 processed reports, the
OutputTo method goes off the deep end. It starts to
generate a report file that actually has some report data
in it. However, it never closes the report file.
Instead, it appears to hang on the file open and continue
to pad the file with blank spaces until someone notices
the application is 'hung' or the server runs out of disk
space.
Any ideas?
John Kutsor