T
Terry
I am converting Access reports to PDF. The converted reports are dumped into
the
default directory of the printer and I then copy them to a more suitable
place.
I then want to delete the original from the default folder but I can't do
that because
the file is open. I use the command
docmd.openreport rptname, acviewnormal
which sends the report to PDF but also open it automatically in acrobat.
Does anyone know how to either stop the report from opening automatically or
close the form so I can do the delete function. Also, I would like to open
the report in the new directory. Can anyone help.
This is my code for copying the file but I would like to add further lines
of code.
Set fso = CreateObject("Scripting.FileSystemObject")
If fso.FileExists(OldPath & strFile) Then
fso.CopyFile OldPath & strFile, SavePath & strFile
(I would like to add delete file code here and also open report from new
location)
End If
Many thanks
the
default directory of the printer and I then copy them to a more suitable
place.
I then want to delete the original from the default folder but I can't do
that because
the file is open. I use the command
docmd.openreport rptname, acviewnormal
which sends the report to PDF but also open it automatically in acrobat.
Does anyone know how to either stop the report from opening automatically or
close the form so I can do the delete function. Also, I would like to open
the report in the new directory. Can anyone help.
This is my code for copying the file but I would like to add further lines
of code.
Set fso = CreateObject("Scripting.FileSystemObject")
If fso.FileExists(OldPath & strFile) Then
fso.CopyFile OldPath & strFile, SavePath & strFile
(I would like to add delete file code here and also open report from new
location)
End If
Many thanks