Sort in VB using a ComboBox Column Other than the Bound Column

Discussion in 'Access Forms Coding' started by magmike, Jul 16, 2012.

  1. magmike

    magmike Guest

    I have a code in VB on the field labels in a continuous form that sorts based on that field when clicked,

    OrderBy = "form.field"

    However, with one field, Status, I would like to sort based on the second column (Column(1), correct?), since right now, it is sorting on the bound column, a hidden column and id number, so the user does not see alphebetical sorting.

    Is there a way to accomplish, this as the following is not working,

    OrderBy - "me.form.field.column(1)"

    Thanks in advance,

    magmike, Jul 16, 2012
    1. Advertisements

  2. magmike

    Ron Weiner Guest

    magmike expressed precisely :
    Ron Weiner, Jul 16, 2012
    1. Advertisements

  3. magmike

    magmike Guest

    The first time was funny. Now I am starting to think that you don't think this newsgroup is supposed to be used at all. And in fact, I did not find my answer in your search. I know how to sort a combo box. Please re-read my post or ignore it and move on.

    Can anyone else help?
    magmike, Jul 16, 2012
  4. magmike

    Ron Weiner Guest

    magmike has brought this to us :
    OK you obviously do not posess the ability to do any research. So here
    is what you need to know:

    1) Neither Combo boxes, nor List boxes have a Sort method.
    2) The order of items in Combo and List boxes is controled by its Row
    Source property.


    Apply whatever sort you require to the query that is the combos Row
    Source property.

    Ron Weiner, Jul 16, 2012
  5. The Microsoft-sponsored newsgroups (including this one) used to be based at, but over a year ago, Microsoft took down that news
    server and replaced the sponsored newsgroups with "forums". However,
    because of the way USENET newsgroups work, they remain as "zombies" (no less
    useful than when hosted at Microsoft). But, it *is* funny that you say what
    you did because, in fact, in Microsoft's view, it isn't "supposed to be used
    at all". Those of us who do are just taking advantage of the way USENET
    Access Developer, Jul 16, 2012
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.