Results 1 to 6 of 6
  1. #1
    detaylor1242 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2013
    Location
    Lacey, WA
    Posts
    19

    Multiple Column sort.


    How do I create a macro that so that I can sort by multiple columns?

    I think a macro would be required for each of the three sorts that I need to do. For example Macro 1 would be for Item number and PLU number, Macro 2 would be for Barcode Number and Unit Price. The order of the columns has to remain stable.

  2. #2
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    You don't need multiple macros. You can store multiple queries, if you like, sorted by whatever/however many fields you want.

  3. #3
    Dal Jeanis is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Dallas TX
    Posts
    1,742
    Where do you want to use this, in a form or in a report? In a form, you could just set the ORDER BY property of the Form. In a Report, you have to fix other things.

  4. #4
    detaylor1242 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2013
    Location
    Lacey, WA
    Posts
    19

    This is used only in a screen view for look up's

    Quote Originally Posted by Dal Jeanis View Post
    Where do you want to use this, in a form or in a report? In a form, you could just set the ORDER BY property of the Form. In a Report, you have to fix other things.
    Can't change the order of the columns as it would really confuse the operators. I am dealing with older volunteers that are in their late 70's and up to 94 years old.

    What I would like is a macro that they can run and and the screen will sort in the right order.

  5. #5
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    What I would like is a macro that they can run and and the screen will sort in the right order.
    This seems like a totally unnecessary step to me. How is the Macro going to know what order to sort by?
    It seems to me like your Macro would just be opening up some pre-defined queries. So why not just open the desired pre-defined query?
    Or am I missing something here?

  6. #6
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,850
    A macro is Not needed. As JoeM suggests, use a predefined query.

    Sort order does not change the position of fields..... JUST the Order by which they are sorted.

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

Similar Threads

  1. 3-column sort in a query
    By JeanZander in forum Queries
    Replies: 11
    Last Post: 12-28-2012, 05:50 PM
  2. Replies: 1
    Last Post: 03-12-2012, 02:41 AM
  3. Replies: 3
    Last Post: 04-19-2011, 06:41 PM
  4. Cannot sort on column contents (Access 2007)
    By jameshurrell in forum Access
    Replies: 6
    Last Post: 03-15-2011, 10:57 AM
  5. export to multiple sheets based on change in sort
    By mws5872 in forum Programming
    Replies: 0
    Last Post: 06-30-2009, 07:55 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