H
Harry V
I'm using ACCESS 2003 and ADO
I'm trying to print a series of reports from a form. The form asks for key
field values, formats and executes SQL to bring a number of records into a
recordset and moves through the recordset via a Do While Not recordset EOF
loop
to build a filter clause to pass to a report, as well as a file name to
output text files to and run the commands:
DoCmd.OpenReport "myReport", acViewPreview, "myQuery", myFilter
DoCmd.OutputTo acOutputReport, "myReport", acFormatTXT, myFileName, False
Each report is run in turn, but I don't have the opportunity to close each
file during the preview, in fact a single preview is displayed while messages
flash saying it is writing each file. The files, though named properly, all
end up with the same text, rather than different report text content.
I'm missing something - is there a way to force a pause between each report
during preview or is there a property in the report that ensures that the
report is closed before then next one is opened? The preview isn't necessary
- the user only needs the text files.
I'm trying to print a series of reports from a form. The form asks for key
field values, formats and executes SQL to bring a number of records into a
recordset and moves through the recordset via a Do While Not recordset EOF
loop
to build a filter clause to pass to a report, as well as a file name to
output text files to and run the commands:
DoCmd.OpenReport "myReport", acViewPreview, "myQuery", myFilter
DoCmd.OutputTo acOutputReport, "myReport", acFormatTXT, myFileName, False
Each report is run in turn, but I don't have the opportunity to close each
file during the preview, in fact a single preview is displayed while messages
flash saying it is writing each file. The files, though named properly, all
end up with the same text, rather than different report text content.
I'm missing something - is there a way to force a pause between each report
during preview or is there a property in the report that ensures that the
report is closed before then next one is opened? The preview isn't necessary
- the user only needs the text files.