I have a module which runs a report in Access in preview mode and attempts
to take a 'snapshot' of it. (I have reference Microsoft Access 9.0).

The attached code will open the report in a 'shell' of access, but will not
perform the 'snapshot'. Access prompts me to 'select format' and then asks
me for a file name? I assumed that this is already in the statement! What
am I doing wrong? Is the syntax incorrect?

Thanks


With mobjAccess.DoCmd
'Open report in preview mode so I can pass in a where clause
.OpenReport msReportName,acViewPreview, "", msWhereClause
'save report to snapshot format
.OutputTo acOutputReport, "", acFormatSNP, "C:\Invrep\snap.snp", true, ""
end with