Hi everyone! I've got a simple form in Access 2010. There are a couple of combo boxes on the form (Shift and CallVolume). There is also a multi-select combo box which pulls employee names from a table called "Employee". I've created a submit button which I want to email the contents from this single form to a static email address, with a static subject line. The problem I'm having is getting the selection from the multi-select combo box into the email. Can you take a look at what I've got and help me out?
Private Sub Submit_Click()
'Creates a new e-mail item and modifies its properties.
Dim olApp As Outlook.Application
Dim objMail As MailItem
Set olApp = Outlook.Application
'Create mail item
Set objMail = olApp.CreateItem(olMailItem)
.To = "email@example.com"
.Subject = "Shift Communication"
.BodyFormat = olFormatHTML
.HTMLBody = "<html><body><u>Current Date</u>: <b>" & Me.CurrentDate & "</b><p><u>Shift</u>: <b>" & Me.Shift & _
"</b></p><p><u>Call Volume</u>: <b>" & Me.CallVolume & "</b></p><p><u>Operators on Shift</u>: <b>" & strList & "</b></p></body></html>"
Dim strMsg As String, strTitle As String
strMsg = "Your shift communication has been submitted."
strTitle = " SUCCESS!! "
If MsgBox(strMsg, vbQuestion + vbOKOnly, strTitle) = vbOK Then
DoCmd.Close acForm, "Frm_ShiftCom"