Alhakeem1977
Registered User.
- Local time
- Today, 16:51
- Joined
- Jun 24, 2017
- Messages
- 308
Hi,
How to send Listbox data within email body in MS Access?
My listbox named List881
Here is my code:
'@@@@@@@@
Private Sub cmdOpenEmail_Click()
On Error GoTo ErrorHandler
*
*DoCmd.SendObject , , , "John@gmail.com", _
*Cc:="", subject:="File Physical Retrieval Request.", _
*MessageText:="Dear SCE," & vbCrLf & " " & vbNewLine & _
*"Kindly arrange to provide me with the physical file as per the below details:" & vbCrLf & vbNewLine & _
*"Account Details:" & "* " & List881 & "." & vbCrLf & vbNewLine & _
*"Your assistance in this matter would be highly appreciated." & vbNewLine & vbNewLine & "Thank you!" & vbNewLine & vbNewLine & _
*"Regards," & vbCrLf & _
*"" & [Forms]![NavigationForm]![txtUserName] & "" & "", EditMessage:=True
*
* DoCmd.Close acForm, "frmFileReqF", acSaveNo
* MsgBox "Message Sent Successfully."
Cleanup:
* Exit Sub
ErrorHandler:
* Select Case Err.Number
* * Case 2501
* * * MsgBox "Email message was Cancelled."
* * Case Else
* * * MsgBox Err.Number & ": " & Err.Description
* End Select
* Resume Cleanup
End Sub
'@@@@@@@@@@@@
Thanks a lot in advance!
Sent from my HUAWEI NXT-L29 using Tapatalk
How to send Listbox data within email body in MS Access?
My listbox named List881
Here is my code:
'@@@@@@@@
Private Sub cmdOpenEmail_Click()
On Error GoTo ErrorHandler
*
*DoCmd.SendObject , , , "John@gmail.com", _
*Cc:="", subject:="File Physical Retrieval Request.", _
*MessageText:="Dear SCE," & vbCrLf & " " & vbNewLine & _
*"Kindly arrange to provide me with the physical file as per the below details:" & vbCrLf & vbNewLine & _
*"Account Details:" & "* " & List881 & "." & vbCrLf & vbNewLine & _
*"Your assistance in this matter would be highly appreciated." & vbNewLine & vbNewLine & "Thank you!" & vbNewLine & vbNewLine & _
*"Regards," & vbCrLf & _
*"" & [Forms]![NavigationForm]![txtUserName] & "" & "", EditMessage:=True
*
* DoCmd.Close acForm, "frmFileReqF", acSaveNo
* MsgBox "Message Sent Successfully."
Cleanup:
* Exit Sub
ErrorHandler:
* Select Case Err.Number
* * Case 2501
* * * MsgBox "Email message was Cancelled."
* * Case Else
* * * MsgBox Err.Number & ": " & Err.Description
* End Select
* Resume Cleanup
End Sub
'@@@@@@@@@@@@
Thanks a lot in advance!
Sent from my HUAWEI NXT-L29 using Tapatalk