Results 1 to 4 of 4
  1. #1
    Dormie is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Dec 2014
    Posts
    39

    Union Query Order By Specific Row Values

    Hi, I've have a union query that I've been playing around with the Order By clause. I was wondering If I can specify the actual order by name in that column for example.

    If I have a column with:


    FirstName:
    Adam
    Brad
    Chris

    Instead of using
    Order by FirstName DESC;

    Can I specify the specific order by the values in the column?
    Order By FirstName Brad Chris Adam

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    In a word, no. You can have a "sort order" field in the same table and sort by that.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Dormie is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Dec 2014
    Posts
    39
    Thank you for the quick response. I added a "sort order" field and is doing exactly what I want! Thanks again!

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Happy to help!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 2
    Last Post: 08-11-2014, 11:01 AM
  2. Replies: 3
    Last Post: 03-06-2014, 02:41 PM
  3. Replies: 1
    Last Post: 12-19-2012, 10:46 PM
  4. Replies: 8
    Last Post: 10-22-2012, 07:43 PM
  5. Showing zero values in a Union Query
    By coach32 in forum Queries
    Replies: 5
    Last Post: 09-06-2011, 07:46 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