Hi All,
First of all thanks for looking into my issue. This is a serious one and I have looked across the internet for a long time without finding the solution...
I have created an order tracing number for one of my clients who does not own MS Access 2010. So I had him install the Runtime version of it. Now I have this particular piece of code (see below) which I run in order to automatically send an e-mail with an order confirmation, where the report is copied so that the name of the pdf file is equal to the ordernumber. Works like a charm in Access 2010, however in the runtime version it doesn't do anything! Even no errors :-(
Any idea guys? I am really desperate. Thanks again!!
ps. Lately I discovered I discovered that some other macro is not working also. This one is a split-screen form which has a exit-button which should save the screen layout (resizing coilumsn, etc), however it doesn't... Might be the same cause?
First of all thanks for looking into my issue. This is a serious one and I have looked across the internet for a long time without finding the solution...
I have created an order tracing number for one of my clients who does not own MS Access 2010. So I had him install the Runtime version of it. Now I have this particular piece of code (see below) which I run in order to automatically send an e-mail with an order confirmation, where the report is copied so that the name of the pdf file is equal to the ordernumber. Works like a charm in Access 2010, however in the runtime version it doesn't do anything! Even no errors :-(
I already simulated a runtime on my own computer and there it does work perfectly.Private Sub Command28_Click()
On Error GoTo errHandler
Dim vRecipient As String
Dim vMsg As String
Dim vSubject As String
vMsg = "Please find attached your Order Confirmation"
vSubject = Forms![Order_header_form]![Ordernummer] & " - Orderbevestiging"
vRecipient = Forms![Order_header_form]!
[List182]
vReportname = Forms![Order_header_form]![Ordernummer]
On Error Resume Next
DoCmd.CopyObject , vReportname, acReport, "Confirmation"
DoCmd.SendObject acReport, vReportname, "PDFFormat(*.pdf)", vRecipient, , , vSubject, vMsg, True
DoCmd.DeleteObject acReport, vReportname
exitOnErr:
Exit Sub
errHandler:
If Err.Number <> 2501 Then MsgBox "Error (" & Err.Number & ") - " & Err.Description, vbCritical
Resume exitOnErr
End Sub
Any idea guys? I am really desperate. Thanks again!!
ps. Lately I discovered I discovered that some other macro is not working also. This one is a split-screen form which has a exit-button which should save the screen layout (resizing coilumsn, etc), however it doesn't... Might be the same cause?