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