Search code examples
ms-accesscomboboxvbadata-retrieval

Getting Data from a Combobox


I'm new to forms in access, so I apologize for asking about something that is probably simple. I am trying to get the chosen value from a combo drop-down into another table. But I am having trouble retrieving the data. I even tried something as simple as just putting it into a message box. After looking up on line I came up with:

Private Sub Combo()
    MsgBox Me.Combo.Column(0)
End Sub

All I get is invalid use of Me Keyword. The Combo's name has been changed to Combo in properties. The values come from table4 (column1) Please help.


Solution

  • Make sure you are writing the code inside the form where your comboBox is placed and also try for this

    MsgBox Me.Combo.Column(0,1)