Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Control the sort order of a query's results.

Status
Not open for further replies.

Prufrock

Instructor
Sep 4, 2002
77
AU
I have a table which holds the choices for responses to questions in a survey. This feeds a lookup in various places on survey forms.
When I organise queries such as Q1 and Group them and place a count of Q1 next to it I get:
Happy 21
Not Sure 8
Very Unhappy 11

This means when I make charts from the queries in reports the order is not correct.

How can I ensure that I get order such as:
Very Happy
Happy
Not Sure
in my query and therefore my chart?
Thanks in anticipation
 
Code:
ORDER BY
   IIF([Answer]='Very Happy', 1,
   IIF([Answer]='Happy'     , 2, 3)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top