Display multiple Columns In Combo Box

Posted on 2012-09-07
Last Modified: 2012-09-07
I have a combo box whose row source is:


Column Bound is 1

When the user selects the pull down I want to display all three columns.
Question by:seamus9909
    LVL 77

    Expert Comment

    YOu can display all 3 columns in the drop down list but once you have made a selection you will only see the first column displayed in the textbox part of the combo.  You cannot change that.

    To see other values from the combo you should add unbound textboxes to the form and then use the afterupdate event procedure of the combo box to fill them.

    Me.textbox1= me.comboboxname.column(1)   ' Lastname
    Me.textbox2= me.comboboxname.column(2)   ' Firstname

    Note that when using VBA code the first column is column(0)
    LVL 61

    Expert Comment

    You can display all column in the dropdown list by adjusting the column count and width properties accordingly, but you can only display one column in the textbox portion.

    If your bound column is an ID and you want to display text, set the column width of the bound column to zero and the textbox portion of the combo will display the next column with a non-zero width.

    To display multiple fields from your combos selected row however, you would need to set up textboxes for these values and set their respective control sources to:

    = cboYourCombo.Column(0)
    = cboYourCombo.Column(1)
    = cboYourCombo.Column(2)
    = cboYourCombo.Column(3)

    etc (zero based column count)...


    I cross posted with Pete.  There may be some additional information in this comment, but it largely duplicates what he already posted.
    LVL 20

    Accepted Solution

    You may want to edit the dropdown properties: Column Count, Column Headings (yes/no), Column Widths,  and LIST WIDTH.  
    Column Count: 3
    Column Headings: Yes
    Column Widths: 2"; 2";1"
    List Width: 5"  (add the column widths values)

    Scott C

    Author Comment

    Yes I don't need to create any additional text boxes I just want the user to be able to see

    the  Company Name

    before making their selections.

    So the row source


    Scott what would the values for the pulldown be The CompanyID shoud not be visible
    LVL 20

    Expert Comment

    Width = 0"
    Make sure your column widths match the order of the columns in your recordsource (for the combo).
    If ID is the first column, then
    Column Widths:  0";2";2";2"

    Scott C
    LVL 20

    Expert Comment

    Make sure the List Width adds up to the column widths.... 0 + 2 + 2 + 2 = 6"
    or else they will be there.... but you won't see them.

    Scott C

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    This article is a continuation or rather an extension from Cascading Combos ( and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
    In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
    In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
    With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

    779 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