justagrunt
Technical User
- Oct 10, 2002
- 132
Hi,
Basically what is needed when a Requisition is printed is an email sent with purchasing departments address and the Requisition number in the subject line.
The question is I can open the email hyperlink to the send to with the email address but what method do I need to add the PurchaseOrderNumber from the form into the subject line and send automatically. I have plagiarised an existing microsoft code and can get the email to open.
Private Sub EnableEmail()
' Update the Print button
On Error Resume Next
PrintForm.HyperlinkAddress = "mailto: " & "Email address here"
End Sub
Private Sub Message()
On Error GoTo HandleErr
' Save the record
If Me.Dirty Then DoCmd.RunCommand acCmdSaveRecord
' Make sure the hyperlink property is current
EnableEmail
' We don't actually have to do anything here. The button uses its own
' hyperlink property to send mail, as specified in the Form_Current
ExitHere:
Exit Sub
HandleErr:
Select Case Err
Case Else
MsgBox Err & ": " & Err.Description, _
, "Form_OrderNumbers.PrintForm_Click"
End Select
Resume ExitHere
End Sub
Cheers
Regards
Bill
Basically what is needed when a Requisition is printed is an email sent with purchasing departments address and the Requisition number in the subject line.
The question is I can open the email hyperlink to the send to with the email address but what method do I need to add the PurchaseOrderNumber from the form into the subject line and send automatically. I have plagiarised an existing microsoft code and can get the email to open.
Private Sub EnableEmail()
' Update the Print button
On Error Resume Next
PrintForm.HyperlinkAddress = "mailto: " & "Email address here"
End Sub
Private Sub Message()
On Error GoTo HandleErr
' Save the record
If Me.Dirty Then DoCmd.RunCommand acCmdSaveRecord
' Make sure the hyperlink property is current
EnableEmail
' We don't actually have to do anything here. The button uses its own
' hyperlink property to send mail, as specified in the Form_Current
ExitHere:
Exit Sub
HandleErr:
Select Case Err
Case Else
MsgBox Err & ": " & Err.Description, _
, "Form_OrderNumbers.PrintForm_Click"
End Select
Resume ExitHere
End Sub
Cheers
Regards
Bill