When I try to print preview a form in Access 2007, I get run-time error 53 (file not found):
any ideas??
with line 258 highlighted (RetVal.......), as below:
End If
DoCmd.OpenReport "rptInvoice", acViewPreview, , " tblInvoice.InvoiceNum=" + CStr(tInvoiceNum)
If IsNull([AttachmentPath]) = False Then
If Right([AttachmentPath], 4) = ".pdf" Then
Dim sAcrobatReaderExe As String ' full path to the Acrobat reader executable
'sAcrobatReaderExe = "C:\Program Files\Adobe\Reader 8.0\Reader\AcroRd32.exe"
If Dir("C:\Program Files\Adobe\Reader 8.0\Reader\", vbDirectory) <> "" Then
sAcrobatReaderExe = "C:\Program Files\Adobe\Reader 8.0\Reader\AcroRd32.exe"
Else
sAcrobatReaderExe = "C:\Program Files\Adobe\Acrobat 7.0\Reader\AcroRd32.exe"
End If
RetVal = Shell(sAcrobatReaderExe & " /P " & Chr(34) & [AttachmentPath] & Chr(34), 0)
Else
DoCmd.OpenReport "rptAttachFile", acViewPreview, , " InvoiceNum=" + CStr(tInvoiceNum)
End If
End If
End Sub