Sorting of data

  • Thread starter Thread starter Carlos
  • Start date Start date
C

Carlos

Hi,

I have a query that will be displayed in a report. The
data it is pulling is
High Impact 80%
Mid Impact 8.56%
Low Impact 11.34%

When I try to display it in the report I want it to look
like above so it has High, then mid then low but currently
it displays
High
Low
Mid
and I cant make it go High, Mid, Low.

How would I sort this so that happens
 
Do you have some field names/table structures you would like to share? Is
there a lookup table that contains High, Mid, and Low?
 
In the table that contains High, Low, Mid, have a number field and sort by
that in the report. If High, Low, Mid are produced by an equation
(IIF(x=a,"High", IIF (x = b, "Mid", "Low")) in your query then create a
second equation which uses IIF to produce 1, 2 or 3 (IIF(x=a,1,IIF(x=b,2,3))
Sort by this second equation but make it invisible in your report.
Evi
 
I got this from one of the help libraries. Forgot which
one. It is a very good example of what you want. You can
substute your field names

Create your own "priority" sort field:
The report is based on a table or query. Change it to use
a query or in the Report's RecordSource property use the
query builder.
Either way, add a field to the query. We'll call PTY for
now. The actual values from your table reside in what
field? We'll call it Priority for now.
Now in the query used a nested IIf() statement to change
the values of the priority field into 1,2,3 or A,B,C -
your choice:

PTY: IIf([Priority]="D",1,IIf([Priority]="P",2,IIf
([Priority]="C",3,4)))

Now the value for PTY will be a 1 if Priority is a "D", it
will be a 2 if it is a "P", it will be a 3 if it is a "C",
and it is necessary to complete the function to make it a
4 when it is anything other than D,P, or C.

** See Help for more on how the IIF() function works

Sort your report on the field (PTY) and just make the
field & label for PTY Visible properties = No.

Jim
 
If you have a field [Priority] that stores High, Low, Mid then you could set
a sorting and grouping dialog to:
=Instr("HighMidLow",[Priority])
 
Duane,

Where is the sorting and grouping Dialog go. I do not
understand where to put this

Eric Blitzer
-----Original Message-----
If you have a field [Priority] that stores High, Low, Mid then you could set
a sorting and grouping dialog to:
=Instr("HighMidLow",[Priority])

--
Duane Hookom
Microsoft Access MVP


Do you have some field names/table structures you would like to share? Is
there a lookup table that contains High, Mid, and Low?


.
 
While in the report design view, hover over the buttons to find the sorting
and grouping or select View|Sorting and Grouping.

--
Duane Hookom
MS Access MVP


Eric Blitzer said:
Duane,

Where is the sorting and grouping Dialog go. I do not
understand where to put this

Eric Blitzer
-----Original Message-----
If you have a field [Priority] that stores High, Low, Mid then you could set
a sorting and grouping dialog to:
=Instr("HighMidLow",[Priority])

--
Duane Hookom
Microsoft Access MVP


Do you have some field names/table structures you would like to share? Is
there a lookup table that contains High, Mid, and Low?

--
Duane Hookom
MS Access MVP


Hi,

I have a query that will be displayed in a report. The
data it is pulling is
High Impact 80%
Mid Impact 8.56%
Low Impact 11.34%

When I try to display it in the report I want it to look
like above so it has High, then mid then low but currently
it displays
High
Low
Mid
and I cant make it go High, Mid, Low.

How would I sort this so that happens


.
 
Thanks, I have never put an expression there.

Happy Holidays

Eric
-----Original Message-----
While in the report design view, hover over the buttons to find the sorting
and grouping or select View|Sorting and Grouping.

--
Duane Hookom
MS Access MVP


Duane,

Where is the sorting and grouping Dialog go. I do not
understand where to put this

Eric Blitzer
-----Original Message-----
If you have a field [Priority] that stores High, Low, Mid then you could set
a sorting and grouping dialog to:
=Instr("HighMidLow",[Priority])

--
Duane Hookom
Microsoft Access MVP


Do you have some field names/table structures you would like to share? Is
there a lookup table that contains High, Mid, and Low?

--
Duane Hookom
MS Access MVP


Hi,

I have a query that will be displayed in a report. The
data it is pulling is
High Impact 80%
Mid Impact 8.56%
Low Impact 11.34%

When I try to display it in the report I want it to look
like above so it has High, then mid then low but currently
it displays
High
Low
Mid
and I cant make it go High, Mid, Low.

How would I sort this so that happens




.


.
 
This is the only reliable method of sorting a report.

--
Duane Hookom
MS Access MVP


Eric Blitzer said:
Thanks, I have never put an expression there.

Happy Holidays

Eric
-----Original Message-----
While in the report design view, hover over the buttons to find the sorting
and grouping or select View|Sorting and Grouping.

--
Duane Hookom
MS Access MVP


Duane,

Where is the sorting and grouping Dialog go. I do not
understand where to put this

Eric Blitzer

-----Original Message-----
If you have a field [Priority] that stores High, Low, Mid
then you could set
a sorting and grouping dialog to:
=Instr("HighMidLow",[Priority])

--
Duane Hookom
Microsoft Access MVP


message
Do you have some field names/table structures you would
like to share? Is
there a lookup table that contains High, Mid, and Low?

--
Duane Hookom
MS Access MVP


message
Hi,

I have a query that will be displayed in a report. The
data it is pulling is
High Impact 80%
Mid Impact 8.56%
Low Impact 11.34%

When I try to display it in the report I want it to look
like above so it has High, then mid then low but currently
it displays
High
Low
Mid
and I cant make it go High, Mid, Low.

How would I sort this so that happens




.


.
 
Back
Top