• Limit on Combo Box columns ?

    Author
    Topic
    #493857

    I’m using Access 2003 and resurrecting my ancient skills on a simple database.

    I have a simple table and a query with 11 columns. I am selecting the key field with a Combo Box which picks up all the remaining columns from the query, then displays some of the results in text boxes. That’s all fine except that I only seem to be able to pick up the first 8 columns, then the text boxes don’t show anything when pointed at the relevant columns eg =Combo0.Column(9)

    Am I doing something wrong, or have I hit an Access limitation ? Either way, is there a better (simple) way of doing this ?

    Thanks

    Viewing 1 reply thread
    Author
    Replies
    • #1444517

      In general combo boxes aren’t used to that many columns, simply because you run out of horizontal space when all of them are displayed. So I presume you are hiding some or most of the columns. The first column in a combo box is referred to as Column(0), so Column(8) would actually be the 9th column. But I’m not aware of any limitation on the column number like you are apparently seeing.

      As an alternate way of doing what I presume you are doing, you bind the form that contains the combo box to the query you are using, and then use the combo box to select a specific record in the query, either with a filter or using a recordset approach. The latter is how the combo box wizard selects a specific record in a table, and in that case the combo box is unbound, and uses a small VBA procedure to display a specific record on the form.

    • #1446452

      Make sure you have defined 11 columns on the combo box property sheet. If you have defined fewer than 11, Access and the combo box will not see all of the query columns and you cannot address them. In your example, not being able to address Column(9) suggests that the number of defined columns in the combo box is less than 10.

      I’m guessing the actual limit is 255, but no one would ever go there, would they? The most I’ve ever used is in the neighborhood of 10.

    Viewing 1 reply thread
    Reply To: Limit on Combo Box columns ?

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: