Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2012

    Question 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
    End Sub
    If anyone has any idea, please let me know. I greatly appreciate it.
    Last edited by AccessN00b; 07-01-13 at 11:27.

  2. #2
    Join Date
    Dec 2012
    I meant to post this under the Access section. My apologizes.

  3. #3
    Join Date
    Dec 2012
    Still stuck on this. Anyone have an idea?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts