Results 1 to 5 of 5
  1. #1
    BLD21 is offline Advanced Beginner
    Windows 2K Access 2007
    Join Date
    Apr 2011
    Posts
    55

    Sorting

    I have a table below, I want to be able to sort by item field but when I do the QUANTITY_UM field will update to show Case first, then Each, Pallet.

    I need for it to remain the same order and just have the records sorted by item name.

    Any ideas?
    ITEM LENGTH WIDTH HEIGHT WEIGHT QUANTITY_UM CONVERSION_QTY
    AP9816 12.50 2.00 2.00 0.17 Each 1.00
    AP9816 14.00 13.70 10.10 4.30 Case 25.00
    AP9816 48.00 40.00 45.40 182.60 Pallet 800.00


  2. #2
    alansidman's Avatar
    alansidman is offline Indifferent
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,536
    In a query, add a field with the following Expression. SortOrder: IIF(Quantity_UM="Each",1,IIF(Quantity_UM="Case",2, 3). Hide this field by unchecking the box below the criteria. Now set the sort order to Item and then SortOrder.

    Alan

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Do you have the Quantity_UM field in table set as Index Yes?
    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.

  4. #4
    BLD21 is offline Advanced Beginner
    Windows 2K Access 2007
    Join Date
    Apr 2011
    Posts
    55
    Alan,

    Doesn't seem to be working, I must be missing something.


    Expr1: [ IIF(Quantity_UM="Each",1,IIF(Quantity_UM="Case",2, 3)]
    sort ascending

    This is asking for a parameter value

  5. #5
    BLD21 is offline Advanced Beginner
    Windows 2K Access 2007
    Join Date
    Apr 2011
    Posts
    55
    Alan,

    Got it. Was missing a right ending ).

    Thanks!

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

Similar Threads

  1. Replies: 11
    Last Post: 01-12-2012, 07:55 PM
  2. IP Sorting
    By neo651 in forum Access
    Replies: 4
    Last Post: 05-24-2011, 01:08 PM
  3. Sorting
    By BorisGomel in forum Access
    Replies: 0
    Last Post: 04-25-2011, 11:22 AM
  4. Sorting Ascended
    By Dalagrath in forum Forms
    Replies: 3
    Last Post: 03-18-2011, 07:25 PM
  5. Need Sorting Help
    By rbpd5015 in forum Access
    Replies: 1
    Last Post: 09-28-2009, 07:39 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