Hi All
i have this code that runs on my forms on load event
Code:
Private Sub Form_Load()
Dim strPDFLink As String
Me.Full_Name = Forms!frmCustomersEditOrders!FullName
Me.Date_Of_Order = Forms!frmCustomersEditOrders![Date Of Order]
DoCmd.OpenReport "rptCustomerInvoice", acViewPreview, "", "", acHidden
DoCmd.OutputTo acOutputReport, "rptCustomerInvoice", acFormatPDF, (DLookup("Path", "tblLinks", "DocumentID = 1")) & "\customers" & "\" & Me.Full_Name.Value & "\Invoices" & "\" & "Invoice Dated" & " " & Format(Date_Of_Order, "dd-mm-yyyy") & ".pdf", False
DoCmd.Close acReport, "rptCustomerInvoice", acSaveNo
strPDFLink = (DLookup("Path", "tblLinks", "DocumentID = 1")) & "\customers" & "\" & Me.Full_Name.Value & "\Invoices" & "\" & "Invoice Dated" & " " & Format(Me.Date_Of_Order, "dd-mm-yyyy") & ".pdf"
Me.WebBrowser0.Object.Navigate strPDFLink
End Sub
this works really nicely and opens the pdf as expected, however when the form closes acrobat reader opens and hangs for about 15 seconds making the application unusable
is there a way to stop Acrobat reader opening up when the form closes?
many thanks
Steve