Solved

Custom sort the order of data in report

Posted on 2008-10-13
4
613 Views
Last Modified: 2013-11-28
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
Comment
Question by:csall
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 500 total points
ID: 22708777
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
 

Author Comment

by:csall
ID: 22709999
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
 

Author Closing Comment

by:csall
ID: 31505785
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
 
LVL 75
ID: 22712724
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Access Form - Button Format Issue 13 50
microsoft Access form help 5 15
office 2016 license quastion 3 44
how to get hundreds part from the number 1 31
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question