Emailing the current record

  • Thread starter Thread starter TK
  • Start date Start date
T

TK

Hi

I want to email the current record in the form.
Basically after I update a record I want to notify users
that this record was changed via an email. I would like
the entire row to be send. Ho do i do this?

Thanks
 
What we do is have a report open that contains all the details from the
current record and attaches it to an email.

Our code looks like...

Private Sub Send_Email_Click()
On Error GoTo Err_Send_Email_Click
Dim msg

If (IsNull([Reference])) Then
msg = "Please select a record before creating the email."
MsgBox (msg)
'If no record selected, stop procedure
Exit Sub
End If

Dim varSubject As String
Dim varText As String
Dim varDocName As String

varRep = IIf(IsNull([UserID]), "*Not Assigned*", [UserID])
varSubject = "Client: " & [Client] & " - " & " Ref: " &
[Reference]
varText = "The following Assignment has been made:" & Chr(10) &
"Assigned Rep: " & varRep & Chr(10) & "Ref: " & [Reference] & Chr(10) &
[Client_] & " - " & [ClientName] & Chr(10) & [Assignment] & " " & [Type]
End If
DoCmd.OpenReport InstallNotificationReport, acViewPreview, "", ""
' Open the Report
DoCmd.SendObject acSendReport, , "Snapshot Format", , , , varSubject,
varText, True
DoCmd.Close

Exit_Send_Email_Click:
Exit Sub

Err_Send_Email_Click:
MsgBox Err.Description
Resume Exit_Send_Email_Click

End Sub


Hi

I want to email the current record in the form.
Basically after I update a record I want to notify users
that this record was changed via an email. I would like
the entire row to be send. Ho do i do this?

Thanks
 
Back
Top