Hello,
I have got the following code on a button which sends an email inserting the current record into the body of the email.
It works fine, however, I would like it to insert ALL the records from the form (there may be multiple records) instead of just the current one on the screen. I would think this is a fairly easy procedure but am not sure exactly how to do this. Any suggestions?
Private Sub Command16_Click()
On Error Resume Next
Dim daBody As String
daBody = ""
daBody = daBody & "UPC: " & Forms!frmMain!UPC.Value & vbCrLf
daBody = daBody & "File Name: " & txtFile.Value & vbCrLf
daBody = daBody & "Date Posted: " & txtDatePost.Value & vbCrLf
daBody = daBody & "Description: " & txtDescription.Value & vbCrLf
daBody = daBody & "Source: " & txtSource.Value & vbCrLf
daBody = daBody & "Accuracy: " & txtAccuracy.Value & vbCrLf
daBody = daBody & "Comments: " & txtComments.Value & vbCrLf
DoCmd.SendObject acSendNoObject, , , "(Wendy Bingham)wendy.bingham@dcr.ca", , , "Update Data Dictionary", daBody
End Sub
Thanks.
I have got the following code on a button which sends an email inserting the current record into the body of the email.
It works fine, however, I would like it to insert ALL the records from the form (there may be multiple records) instead of just the current one on the screen. I would think this is a fairly easy procedure but am not sure exactly how to do this. Any suggestions?
Private Sub Command16_Click()
On Error Resume Next
Dim daBody As String
daBody = ""
daBody = daBody & "UPC: " & Forms!frmMain!UPC.Value & vbCrLf
daBody = daBody & "File Name: " & txtFile.Value & vbCrLf
daBody = daBody & "Date Posted: " & txtDatePost.Value & vbCrLf
daBody = daBody & "Description: " & txtDescription.Value & vbCrLf
daBody = daBody & "Source: " & txtSource.Value & vbCrLf
daBody = daBody & "Accuracy: " & txtAccuracy.Value & vbCrLf
daBody = daBody & "Comments: " & txtComments.Value & vbCrLf
DoCmd.SendObject acSendNoObject, , , "(Wendy Bingham)wendy.bingham@dcr.ca", , , "Update Data Dictionary", daBody
End Sub
Thanks.