G
Guest
Hello!
I have a small issue I hope. Below is the code I use for sending an email
from an Access form. It's works great and does excatly what I want it to do
except for one thing; I would like for the Field name to show in the email.
Currently, I am getting the information that is in the field but I also want
to capture the name of the field the information is coming from. Any help
would be appreciated!!
Thanks!!!
Code:
Private Sub cmdSendEmail_Click()
On Error GoTo EH
Dim SendTo As String, MySubject As String, MyMessage As String
SendTo = ""
MySubject = "Procedure Update"
MyMessage = Me.ProcNumber & vbCr & Me.ProcName & vbCr & Me.EffDate & _
vbCr & Me.Comments
DoCmd.SendObject acSendNoObject, , , SendTo, , , MySubject, MyMessage, True
EH:
If Err.Number = 2501 Then
MsgBox "This email message has not been sent. Message has been
cancelled."
End If
End Sub
I have a small issue I hope. Below is the code I use for sending an email
from an Access form. It's works great and does excatly what I want it to do
except for one thing; I would like for the Field name to show in the email.
Currently, I am getting the information that is in the field but I also want
to capture the name of the field the information is coming from. Any help
would be appreciated!!
Thanks!!!
Code:
Private Sub cmdSendEmail_Click()
On Error GoTo EH
Dim SendTo As String, MySubject As String, MyMessage As String
SendTo = ""
MySubject = "Procedure Update"
MyMessage = Me.ProcNumber & vbCr & Me.ProcName & vbCr & Me.EffDate & _
vbCr & Me.Comments
DoCmd.SendObject acSendNoObject, , , SendTo, , , MySubject, MyMessage, True
EH:
If Err.Number = 2501 Then
MsgBox "This email message has not been sent. Message has been
cancelled."
End If
End Sub