Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Sep 2007
    Location
    Chatham, Kent, England
    Posts
    214
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Combo Box List Order (Access 97)

    Hello Everybody

    My magnificent database has a form based on a query which is based on three tables, in the usual way!

    A combo box on the form was put there with the Wizard using another query which is also based on one of the tables.

    My problem is that the list displayed in the combo box appears to be in random order, this makes finding your chosen selection time consuming.

    The data in both the table and the query has been sorted alphabetically.

    How can I get the data in the combo box drop down list to appear aplhabetically?

    All suggestions gratefully received.

    Regards

    Graeme

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Combo Box List Order (Access 97)

    The Combo Box Wizard has probably created a query (or rather, an SQL string) to act as Row Source for the combo box. Depending on the exact situation, you may be able to replace this by the name of the query you already had; if that query is sorted, the dropdown list should be sorted the same way. If it is not possible to use the name of the query, edit the SQL string by clicking the builder button (the three dots) to the right of it. Apply the desired sort order here.

  3. #3
    2 Star Lounger
    Join Date
    Sep 2007
    Location
    Chatham, Kent, England
    Posts
    214
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combo Box List Order (Access 97)

    Hans

    Didn't want to replace the SQL string as the data displayed on the form is a function of a command button on a previous form.

    So I clicked the three buttons to the right of the SQL string, selected datasheet view, did a sort ascending, saved it, closed it, saved the form, closed the form, reopened the form, still didn't work!

    If I replace the SQL string with the query name can I simply put the SQL string back in again later if this doesn't work either? Don't want to mess up the whole form!

    Graeme

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Combo Box List Order (Access 97)

    >> selected datasheet view, did a sort ascending, saved it

    That doesn't work! You must set the sort order in the query design grid.

  5. #5
    2 Star Lounger
    Join Date
    Sep 2007
    Location
    Chatham, Kent, England
    Posts
    214
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combo Box List Order (Access 97)

    Silly me! That's bloody obvious!

    Thanks all sorted now.

    Regards

    Graeme

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •