Results 1 to 3 of 3
  1. #1
    MarcieFess is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Posts
    9

    Query to Select Records and Alphabetize them


    I posted a question on the Forms forum on an error I'm getting when I try to put the call to this query on a button and limit it by the entries in combo boxes on the form; hopefully that question will be answered there.

    I have a question concerning this actual query. One of the fields in our data tables is MSDS, and the entries are hyperlinks to PDF documents stored on our servers.

    The form takes input from the user who chooses a company, and then a store within that company. The query needs to limit its selections to only the MSDS entries that are connected to that specific store.

    I need the list to appear in alphabetical order when the query runs.

    Here is my code so far:

    Code:
    SELECT DISTINCT Product.MSDS
    FROM Product INNER JOIN tblStoreProducts ON Product.[ProductKey] = tblStoreProducts.[ProductKey]
    WHERE (((tblStoreProducts.MaxUnits)<>0) AND (([Product.HazardKey])<>79))
    GROUP BY Product.MSDS, tblStoreProducts.StoreKey
    HAVING (((Product.MSDS) Is Not Null))
    ORDER BY Product.MSDS;
    The results are not in alphabetical order. It's ALMOST in alphabetical order, but there are a couple of entries that appear at the very top of the list that are out of order. Does anyone have any ideas for me?

    Marcie

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,892
    Thread is marked solved - is that correct?
    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
    MarcieFess is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Posts
    9

    Solved Query issue

    Quote Originally Posted by June7 View Post
    Thread is marked solved - is that correct?
    Yes it is correct. I found a solution to the issue after a lot of trial and error, before anyone had a chance to respond on this thread. It doesn't happen very often!

    Marcie

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

Similar Threads

  1. SELECT TOP 10 Query returns 12 records
    By Paul H in forum Queries
    Replies: 8
    Last Post: 09-11-2013, 03:38 PM
  2. Replies: 4
    Last Post: 08-06-2012, 07:05 PM
  3. Delete and/or Select Distinct records query
    By admessing in forum Queries
    Replies: 39
    Last Post: 02-14-2012, 03:50 PM
  4. Replies: 3
    Last Post: 01-04-2011, 07:06 PM
  5. Alphabetize Information
    By caljohn527 in forum Forms
    Replies: 1
    Last Post: 02-11-2009, 10:50 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