Hi all, I have a form which allows users to input the data and send email using the data, everything works well except for when I add a combo box with multiple values and trying to add the values in the email, it won't work - Please help
My code looks this below (I found it on the internet)
Code:
Private Sub sendemail_Click()
On Error GoTo ErrorHandler
Dim varName As Variant
Dim varCC As Variant
Dim varSubject As Variant
Dim varBody As Variant
varName = "me@gmail.com"
varCC = "meme@gmail.com, mememe@gmail.org"
'separate each email by a ','
varSubject = "My email subject"
'Email subject
varBody = "My email body" 'Im trying to add a combo box with multiple values here
'Body of the email
DoCmd.SendObject , , , varName, varCC, , varSubject, varBody, True, False
'Send email command. The True after "varBody" allows user to edit email before sending.
'The False at the end will not send it as a Template File
ErrorHandler:
Select Case Err.Number
Case 2501
MsgBox ("Email not sent.")
End Select
End Sub