mistyinca1970
Member
- Local time
- Today, 05:53
- Joined
- Mar 17, 2021
- Messages
- 117
Sorry if the title is confusing.
What I'm trying to do is use both columns of a combo box in different ways. My combo box (cboSendTo) has two (visible) columns: one's name and then one's email address. Is there a way to specify the column of the combo box to use in code other than whichever column is bound? I would like to use column 2 (name) in one place and column 3 (email address) in another. Is this even possible?
Thank you,
What I'm trying to do is use both columns of a combo box in different ways. My combo box (cboSendTo) has two (visible) columns: one's name and then one's email address. Is there a way to specify the column of the combo box to use in code other than whichever column is bound? I would like to use column 2 (name) in one place and column 3 (email address) in another. Is this even possible?
Code:
Private Sub btnEmail_Click()
On Error Resume Next
MsgBox "You will need to add any document attachments to the email manually.", vbOKOnly, "Generating Action Item"
DoCmd.SendObject , "", "", cboSendTo, "", "", "Contrax™: Action item from " & TempVars!UserFullName & ". Due By: " & DueBy, "Date Created: " & DateofEntry & vbCrLf & "Due by: " & DueBy & vbCrLf & "Staff Name: " & cboSendTo & vbCrLf & "Contract #: " & cboContract & vbCrLf & "Note: " & Notes, True
DoCmd.GoToRecord , "", acNewRec
If (MacroError <> 0) Then
Beep
MsgBox MacroError.Description, vbOKOnly, ""
End If
End Sub
Thank you,