Results 1 to 5 of 5
  1. #1
    hnorgaar is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2021
    Posts
    19

    Multi value listt box unsorted

    Hi there



    I have a form which can choose different car brands, then model and engine. Thats all good. Now I also get different engines with different horse power and need to choose several of them. Thats working too, but the values from the multi value list stored in my multi field chosen like 75HK, 90HK, 100HK, 145HK, but the result in the multi box field comes out unsorted like everything under 100(HK) last like this 100HK, 145HK, 75HK, 90HK. Can I sort them somehow?
    Thx for any input

    Henrik

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,963
    This is alpha sort rules, one character at a time. 1 comes before 7. If you want 75HK before 100HK then need to use placeholder zeros. 075HK will sort before 100HK.

    Are letters "HK" always included? Why save those?
    Last edited by June7; 03-19-2022 at 11:36 AM.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,656
    You may also be able to add a field to your query, removing the letters with val() and converting to numeric with Clng() so it sorts properly.
    something like Clng(val(YourFieldName))
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  4. #4
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,570
    Hi Henrik

    Can you upload a copy of your database?
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  5. #5
    hnorgaar is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2021
    Posts
    19
    Thx guys, found a VBA to update the sorting in the field

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

Similar Threads

  1. How to multi select items from multi boxes
    By ijaz8883 in forum Forms
    Replies: 2
    Last Post: 07-01-2020, 04:42 AM
  2. Replies: 6
    Last Post: 12-09-2019, 02:27 PM
  3. Multi-dimensional/Multi-type Array
    By Ellpee in forum Programming
    Replies: 5
    Last Post: 01-28-2016, 05:58 PM
  4. Replies: 1
    Last Post: 02-27-2014, 03:43 PM
  5. Replies: 2
    Last Post: 08-31-2012, 02:20 PM

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