Private Sub Form_Load()
Dim pdf As AcroPDF
pdfReader.Height = 8500
pdfReader.Width = 14500
pdfReader.setShowToolbar True
Set pdf = pdfReader.Object
If Nz(Me.OpenArgs, "") <> "" Then
On Error GoTo BadFile
pdf.LoadFile (Me.OpenArgs)
Err.Clear
On Error GoTo 0
End If
Set pdf = Nothing
Exit Sub
BadFile:
MsgBox "The scanned cheque could not be accessed." & vbNewLine & "Please notify an administrator immediately.", vbCritical + vbOKOnly
DoCmd.Close acForm, Me.Name, acSaveYes
End Sub
|