If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
How to sort data but not in alphabet order
|
#3
|
|||
|
|||
"fredg" wrote in message
On Mon, 28 Mar 2005 22:20:53 -0500, wrote: Hi I need to sort the data in precedence order , not in alphabetic one. Like Sr.V.I.P is the First, V.I.P is 2nd. Department Manager is 3rd. Team Leader is 6th, analyst is 9th and ..... Suppose I have 2 fields, One is management Level as explained above and the other is Name Thanks, Saeid Access can only sort in alphabetical order or numeric order, so you'll need to add another column to whatever query is used as recordsource for your form or report: SortThisWay:IIf([Title] = "Sr.V.I.P.",1,IIf([Title] = "V.I.P.",2,IIf([Title] = ... etc....))) Sort by this number column. You can also use a User defined function using Select Case, or If..Then ..Else if you have too many titles to sort using IIF(), and call the function from the query. Or create a TitlePrecedence table, with fields Title (text) and Precedence (number) to associate each title with its numeric precedence. Then, in a query, join that table to the original table on the Title field, and sort on the Precedence field. Although that takes a bit more setting up, I think it would be more flexible. -- Dirk Goldgar, MS Access MVP www.datagnostics.com (please reply to the newsgroup) |
#4
|
|||
|
|||
Create a table with two columns: Title and TitleRank where Title may be Sr.
VP, VP, Director, Manager etc. In the Titlerank column enter a numeric value corresponding to the sort order. Rafi " wrote: Hi I need to sort the data in precedence order , not in alphabetic one. Like Sr.V.I.P is the First, V.I.P is 2nd. Department Manager is 3rd. Team Leader is 6th, analyst is 9th and ..... Suppose I have 2 fields, One is management Level as explained above and the other is Name Thanks, Saeid |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How do I sort a column of data and have each data row sort accordi | Oedalis | General Discussion | 1 | March 17th, 2005 11:52 PM |
how to sort the data display order of multiple chart | cho | General Discussion | 1 | August 4th, 2004 10:59 AM |
How to create graphs in a monthly report where the base data can change | John Clarke | Charts and Charting | 3 | June 25th, 2004 02:22 AM |
Change plotting order of data points | Jon Peltier | Charts and Charting | 0 | April 1st, 2004 10:33 PM |