Sorting in Query and Report involving look up combo box

E

Esaw

I have this query and cannot get it to sort by the StyleNumber. I think it's
sorting by the ID and not by the actual StyleNumber and that's why it looks
like it's not sorted ascending. I've also set up a report involving this
query and am not able to sort there either. Could someone give me some
insight on this? Thanks so much. Below is the Query

SELECT Contracts.ArtistName, Contracts.StyleNumber,
Contracts.StyleDescription, Contracts.ClientName, Contracts.ContractStart,
Contracts.ContractEnd, Contracts.RoyaltyRate, Contracts.Product
FROM Art RIGHT JOIN Contracts ON (Art.StyleNumber = Contracts.StyleNumber)
AND (Art.StyleDescription = Contracts.StyleDescription)
WHERE (((Contracts.ContractEnd)>=Now() Or (Contracts.ContractEnd) Is Null));

The report uses this query and then the StyleDescription uses a look up
combo box involving the StyleNumber. Could this be why I can't sort by
StyleNumber?

Thank you for any help with this.
E
 
K

Klatuu

Your query doesn't sort because there is no ORDER BY clause in it.
Reports ignore the sort order of a query. To sort for a report, use the
reports Sorting and Grouping.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top