Save unbound combobox column value in Access 2007

Posted on 2009-12-30
Last Modified: 2013-11-29
I have a combobox that has two columns. Column 0 contains the index number and is bound, column 1 contains the description and is displayed. I need to be able to reference both values, but I cannot seem to reference the unbound column.

I would expect something like this to work:
But Access does not recognize the Column property. Anyone have a thougt?
Question by:JP_TechGroup
    LVL 3

    Expert Comment

    my friend, you do not need the column for your needs.
    the idea is that :

    [Forms]![MyForm]![MyCombobox].SelectedItem.Value will give you the Index and the Text is your description

    hope this is helping you out

    Author Comment

    Hmmm, value returns the index, but text does not return anything.

    Author Comment

    Perhaps I should add that I am trying to update a table with this data using docmd.runsql
    with this reference as part of the query.

    If I create a text box and bind it to the combobox using .text as you suggested, it works fine... if I use it in the query, it returns nothing.
    LVL 58

    Accepted Solution

    The Column() property is mistaken for a function by the Jet expression evaluator. You cannot use it in a query. Instead, you can use =MyCombobox.Column(1) in a text box, and refer to that text box in your query. Better yet, refer to the column directly, meaning outside of the quotes, while building your query. For example:

    DoCmd.RunSql "INSERT INTO Table1(Field1) VALUES('" & MyCombobox.Column(1) & "')"

    LVL 31

    Assisted Solution

    It may be helpful to assign the value to a variable, so you can display it in the Immediate window for debugging purposes.  The syntax for referencing a combo box column (on the current form) is:
    LVL 31

    Expert Comment


    Me![txtLastNameFirst] = Me![cboSelect].Column(1)
       strLastNameFirst = Me![cboSelect].Column(1)

    Open in new window

    LVL 31

    Expert Comment

    Then you can use the variable in your SQL code.

    Author Closing Comment

    I used both solutions. Thank you!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    The first two articles in this short series — Using a Criteria Form to Filter Records ( and Building a Custom Filter ( — discuss in some detail how a form can be…
    It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now