I have a column in my report called "Status". The Status will be either Complete - Incomplete - Partial. How do I make the column list by Complete - Partial - Incomplete??
I'm not clear about what you want. The subject says sort by words, not by column. However, in a query you can only "Order By" columns but the data (or words) in the columns would be sorted. For example, data in the status column could be ordered Complete, Incomplete, Partial. To do this requires only an "Order By status" clause at the end of the query.
But are you asking about how to make a Cross-Tab query with Complete, Incomplete, Partial as column headings? Please clarify.
In my report I would like to have, under Status, show all entries that are "Complete", first. Then all entries that are Partial, second. Then all entries that are Incomplete, third.
since you will probably want to sort by more than just the status field, add an expression field to your query, use an IIf statement to set the status sort order, and sort this field ascending. Just ensure you locate this field in the query grid prior to any other field you sort on.
Then select Sort Ascending on that column. If you have additional columns to Sort place them after this column. You can choose to display this new column in the result or suppress it. Terry
I copied your statement and pasted into a new column criteria in the query. I get an error message. "The expression you enter has an invalid...", click OK and the cursor blinks on the first open parentheses. I have four open parentheses and four closed parentheses. I do have the two parentheses on the end. Not sure why I'm getting this error message.
I have found when copying and pasting from a web page to Access that the "" can get messed up. Or you end up copying hard returns or spaces that aren't really noticable but mess up your code. try typing it manually. ruth.jonkman@wcom.com
Not sure what I'm doing wrong. Select the query name, click on design, then inserted a new column. Left "Field" "Table" "Sort" blank. Typed MYSTATUS: IIf(Left([STATUS],1)="C",1,IIf(Left([STATUS],1)="P",2,3)) in Criteria. Go to click on "Sort" and get the error message.
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.