Results 1 to 5 of 5
  1. #1
    DigitalAdrenaline is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Dec 2012
    Posts
    100

    Resorting Combo Box In Alphabetical Order

    Hi, I'm having trouble resorting a combo box linked to a table to appear in alphabetical order.

    I click a cmdButton op open a form containing a subform table of my data. I add the data, save and requery the table to appear in alphabetical order.
    I refresh my main form with the combo box, and when i select the drop-down list, it's not in alphabetical order. Something is disconnected. I'm checking all the source linking and nothing appears to be out of order. Just wondering what I've missed. Cheers..

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,424
    two questions:

    Is the field in the table a lookup?
    what is the rowsource to your combo

  3. #3
    DigitalAdrenaline is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Dec 2012
    Posts
    100
    Hi Ajax, no, there's no lookup.

    frmOne is RecordSource linked to tblOne. To add new data, a cmdButton on frmOne opens frmTwo which has a subform sourced to Table.tbleOne.
    When I add new data, I click a cmdButton that saves, GoesToNewRecord, and Requeries the table into alphabetical order. No problem so far.
    I close frmTwo, back to frmOne and click a refresh button. This step is supposed to reorder the records (combo boxes) in frmOne alphabetically. But alas, it doesn't.

    Now I'm perplexed.

  4. #4
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    This step is supposed to reorder the records (combo boxes) in frmOne alphabetically. But alas, it doesn't.
    How are you doing that? The ordering of the records in your forms and subforms, and the ordering of the rows in a combo box are independent operations, i.e. resorting a form will not automatically resort the combo box. You need to explicitly requery the combo. If you want to have the rows in the combo sorted in a specific order, you should include an ORDER BY in the combo's row source.

  5. #5
    DigitalAdrenaline is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Dec 2012
    Posts
    100
    Thanks John, that was the missing link, ORDER BY in the Row Source . The combo box is now in Alphabetical order. I'm building my project off the back of Udemy, you Tube and the Access 12010 Bible. I've obviously misinterpreted the REQUERY function from the video I was watching. I spent hours last night trying to solve this issue. Many thank. Cheers.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. alphabetical order from different fields.
    By xtrmsound in forum Access
    Replies: 2
    Last Post: 05-29-2014, 02:10 PM
  2. alphabetical order of lists
    By FB93 in forum Access
    Replies: 1
    Last Post: 03-27-2014, 06:23 PM
  3. Why is my form opening in alphabetical order?
    By Access_Novice in forum Forms
    Replies: 6
    Last Post: 12-10-2013, 05:22 PM
  4. Records are not in alphabetical order
    By snowboarder234 in forum Forms
    Replies: 3
    Last Post: 04-12-2012, 03:30 PM
  5. Combo Box in Alphabetical order
    By jordanturner in forum Forms
    Replies: 2
    Last Post: 09-24-2010, 08:02 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums