B
BaWork
I'm using the following code to set the report name of a snapshot file
on save and it works perfectly.
*************************
Private Sub cmd_save_report_Click()
On Error GoTo Err_cmd_save_report_Click
Dim stDocName As String
stDocName = first_name & "_" & last_name & "_resume"
DoCmd.OutputTo acReport, stDocName, acFormatSNP
Exit_cmd_save_report_Click:
Exit Sub
Err_cmd_save_report_Click:
MsgBox Err.Description
Resume Exit_cmd_save_report_Click
End Sub
*************************
If I transfer the same coding logic to send a snapshot file through
email, I get the following error:
"The report name "first_last_resume" you entered in either the property
sheet or macro is misspelled or refers to a report that doesn't exist."
Here is my current code.
*******************************
Private Sub cmd_email_report_Click()
On Error GoTo Err_cmd_email_report_Click
Dim stDocName As String
stDocName = first_name & "_" & last_name & "_resume"
DoCmd.SendObject acReport, stDocName, acFormatSNP
Exit_cmd_email_report_Click:
Exit Sub
Err_cmd_email_report_Click:
MsgBox Err.Description
Resume Exit_cmd_email_report_Click
End Sub
*******************************
Thanks
Brett
on save and it works perfectly.
*************************
Private Sub cmd_save_report_Click()
On Error GoTo Err_cmd_save_report_Click
Dim stDocName As String
stDocName = first_name & "_" & last_name & "_resume"
DoCmd.OutputTo acReport, stDocName, acFormatSNP
Exit_cmd_save_report_Click:
Exit Sub
Err_cmd_save_report_Click:
MsgBox Err.Description
Resume Exit_cmd_save_report_Click
End Sub
*************************
If I transfer the same coding logic to send a snapshot file through
email, I get the following error:
"The report name "first_last_resume" you entered in either the property
sheet or macro is misspelled or refers to a report that doesn't exist."
Here is my current code.
*******************************
Private Sub cmd_email_report_Click()
On Error GoTo Err_cmd_email_report_Click
Dim stDocName As String
stDocName = first_name & "_" & last_name & "_resume"
DoCmd.SendObject acReport, stDocName, acFormatSNP
Exit_cmd_email_report_Click:
Exit Sub
Err_cmd_email_report_Click:
MsgBox Err.Description
Resume Exit_cmd_email_report_Click
End Sub
*******************************
Thanks
Brett