Unanswered: Pick combobox column to display via VBA
I have some vba code that opens up notepad and populates it with data from Access 2010. Everything works great including the notepad function, the database, and how the data is stored and displayed in the table/form.
The problem: I want to display the servicer name not the ID in notepad
I passed the field that I want to include in notepad as a string. However, it returns the ID and not the name of the person.
I don't want to change anything in the form or field property because it works perfect as is.
Is there a way to pick which column to display in the Email by vba code?
I have been googling for a solution but have yet to find any. I keep on finding the idea of setting the column # by doing the following but it doesn't work
Column 0 = the ID and Column 1 = the name
^^That doesn't work for me
Here's my code (it works)
Private Sub cmdNoteAccept_Click()
Dim strCode As String
strCode = strCode & Me.Servicer & ": "
strCode = strCode & Format(Me.DateCreated, "MM/DD/YYYY")
strCode = strCode & "Insert message here"
Shell "Notepad.exe", vbNormalFocus
SendKeys strCode, True
If anyone has any idea, please let me know. I greatly appreciate it.