Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 631
  • Last Modified:

Custom sort the order of data in report

I need help with a report that I need to custom sort the order of data in a report.  I cannot use ascending or descending becuase of the order needed.  Here is what I need for the order:

1.  Letter awaiting approval
2. Letter returned, no CPW
3. CPW awaiting approval
4. 30 days to expiration date

Any help will be appreciated.
0
csall
Asked:
csall
  • 2
  • 2
1 Solution
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
In the query of the report, create a Sort field like sort, then specify that is the Sort in the Grouping and Sorting dialog:

MySort: Switch([YourField]= "Letter awaiting approval",1 , [YourField]= "Letter returned, no CPW",2, [YourField]= "CPW awaiting approval", 3, [YourField]= "30 days to expiration date",4)

mx
0
 
csallAuthor Commented:
Where is the query do I create the sort field?  I am looking for where to put the code you provided me sot aht I can select it in the sort and grouping dialog box.
0
 
csallAuthor Commented:
I had a brain fart.  I put your code into a new field in the Query and put in the correct field name and it works like a charm.  Thank you very much.
Carl
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
Grading Comments:
I had a brain fart. I put your code into a new field in the Query and put in the correct field name and it works like a charm. Thank you very much.
Carl

You are welcome.

mx
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now