Looks like you are looking for a WHERE statement, vs. "SORT"? You are opening the report to see one single "category", right? No need to sort by it if there is only one.
Also, you need quotes around the report name, and after the third comma is the WHERE statement (not a sort statement):
(substitute in the name of the category field in your report's recordsource for "CategoryFieldName") This is using single quotes, assuming "Category" is text (since you dim'd it as 'str' earlier).
If you really want to sort something, do it in the report's recordsource or in the SORTING AND GROUPING feature of the report itself.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244. Basics at
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.