Hello!
I need some direction / advice. I inherited an Access 2003 database from someone who left my company many years ago. Three years ago we moved from Office 2003 to Office 2010 and have been slowly moving our databases from MDB to ACCDB.
This is one of the last databases that I have been working on. It was originally built as Access 2003 and I have saved it in Access 2010.
Originally, users would send out a safety report as a SNP attachment as Access 2003 did not support PDF. When I saved the database as ACCDB, I changed the lines of code from:
to:
As Access 2010 does not support SNP and my company wanted the report to be sent as PDF anyway.
However, here is my issue: Sometimes it works fine, no errors, no problem. And sometimes it crashes the database and does not sent the email.
Has anyone ever run into this? Is it because the database was originally built in Access 2003? Any advice? Suggestions? Thank you in advance!
I need some direction / advice. I inherited an Access 2003 database from someone who left my company many years ago. Three years ago we moved from Office 2003 to Office 2010 and have been slowly moving our databases from MDB to ACCDB.
This is one of the last databases that I have been working on. It was originally built as Access 2003 and I have saved it in Access 2010.
Originally, users would send out a safety report as a SNP attachment as Access 2003 did not support PDF. When I saved the database as ACCDB, I changed the lines of code from:
Code:
Sub EmailIncidentReport()
Dim HoldDept As String
Dim HoldGroup As String
HoldDept = Forms![HoldingInfo].txtDept.Value
HoldGroup = Forms![HoldingInfo].txtHoldArea.Value
DoCmd.SendObject acSendReport, "IncidentInvestigationEmailrpt", acFormatSNP, "Accident Investigation", , , "" & HoldDept & " " & HoldGroup & " Incident Investigation", "Please review the attached Incident Investigation Report."
End Sub
to:
Code:
Sub EmailIncidentReport()
Dim HoldDept As String
Dim HoldGroup As String
HoldDept = Forms![HoldingInfo].txtDept.Value
HoldGroup = Forms![HoldingInfo].txtHoldArea.Value
Const acFormatPDF = "PDF Format (*.pdf)"
DoCmd.SendObject acSendReport, "IncidentInvestigationEmailrpt", acFormatPDF, "Accident Investigation", , , "" & HoldDept & " " & HoldGroup & " Incident Investigation", "Please review the attached Incident Investigation Report."
End Sub
As Access 2010 does not support SNP and my company wanted the report to be sent as PDF anyway.
However, here is my issue: Sometimes it works fine, no errors, no problem. And sometimes it crashes the database and does not sent the email.
Has anyone ever run into this? Is it because the database was originally built in Access 2003? Any advice? Suggestions? Thank you in advance!