Advanced sort

  • Thread starter Thread starter Cath
  • Start date Start date
C

Cath

Hi,
I am trying to sort some data in a report. What I am trying to do is for
exemple, I have these datas: 20056, 10048, 60071, 30025

I want to sort in ascending order but from the 4th number, like this:

30025
10048
20056
60071

Is it possible?

Thank you
 
I want to sort in ascending order but from the 4th number
I assume that you do not want to ignore the rest of the data in the process
of sorting.
You can open your query in design view and add a calculated field to sort on
like this --
My_Sort: Right([MyDataField],2) & [MyDataField]
I assume that you do not want to ignore the rest of the data in the process
of sorting I added the "& [MyDataField]" for a complete sort.
 
When you say to add a calculated field ...you mean in the CRITERIA box?

KARL DEWEY said:
I assume that you do not want to ignore the rest of the data in the process
of sorting.
You can open your query in design view and add a calculated field to sort on
like this --
My_Sort: Right([MyDataField],2) & [MyDataField]
I assume that you do not want to ignore the rest of the data in the process
of sorting I added the "& [MyDataField]" for a complete sort.

--
KARL DEWEY
Build a little - Test a little


Cath said:
Hi,
I am trying to sort some data in a report. What I am trying to do is for
exemple, I have these datas: 20056, 10048, 60071, 30025

I want to sort in ascending order but from the 4th number, like this:

30025
10048
20056
60071

Is it possible?

Thank you
 
No, insert a new column and paste what I posted editing it to use your field
name.
--
KARL DEWEY
Build a little - Test a little


Cath said:
When you say to add a calculated field ...you mean in the CRITERIA box?

KARL DEWEY said:
I want to sort in ascending order but from the 4th number
I assume that you do not want to ignore the rest of the data in the process
of sorting.
You can open your query in design view and add a calculated field to sort on
like this --
My_Sort: Right([MyDataField],2) & [MyDataField]
I assume that you do not want to ignore the rest of the data in the process
of sorting I added the "& [MyDataField]" for a complete sort.

--
KARL DEWEY
Build a little - Test a little


Cath said:
Hi,
I am trying to sort some data in a report. What I am trying to do is for
exemple, I have these datas: 20056, 10048, 60071, 30025

I want to sort in ascending order but from the 4th number, like this:

30025
10048
20056
60071

Is it possible?

Thank you
 
Hi,
I am trying to sort some data in a report. What I am trying to do is for
exemple, I have these datas: 20056, 10048, 60071, 30025

I want to sort in ascending order but from the 4th number, like this:

30025
10048
20056
60071

Is it possible?

Thank you

You MUST use the report's sorting and grouping dialog, as the sort
order of the query is irrelevant in the report.

This question was asked by you just an hour and 1/2 ago and has been
answered. Please find your previous message and my reply for the
expressions to use.
 
Hi,
I am trying to sort some data in a report. What I am trying to do is for
exemple, I have these datas: 20056, 10048, 60071, 30025

I want to sort in ascending order but from the 4th number, like this:

30025
10048
20056
60071

Is it possible?

Thank you

In a vacant Field cell in your Query type

FourthDigit: Mid([fieldname], 4, 1)

This will extract just that one digit. You can then sort this field ascending.
You don't say how you want to handle ties - you may want to put this
calculated field to the left of any other subsidiary sort fields.
 
Im sorry but I still don't get you....
I go in Create a query with design view...
but I cannot add a column there....

KARL DEWEY said:
No, insert a new column and paste what I posted editing it to use your field
name.
--
KARL DEWEY
Build a little - Test a little


Cath said:
When you say to add a calculated field ...you mean in the CRITERIA box?

KARL DEWEY said:
I want to sort in ascending order but from the 4th number
I assume that you do not want to ignore the rest of the data in the process
of sorting.
You can open your query in design view and add a calculated field to sort on
like this --
My_Sort: Right([MyDataField],2) & [MyDataField]
I assume that you do not want to ignore the rest of the data in the process
of sorting I added the "& [MyDataField]" for a complete sort.

--
KARL DEWEY
Build a little - Test a little


:

Hi,
I am trying to sort some data in a report. What I am trying to do is for
exemple, I have these datas: 20056, 10048, 60071, 30025

I want to sort in ascending order but from the 4th number, like this:

30025
10048
20056
60071

Is it possible?

Thank you
 
Click on the query. Click on the design icon (looks like a funny triangle and
the word 'Design' next to it. On the menu bar click INSERT - Column. Paste
what I posted editing it to use your field name.

--
KARL DEWEY
Build a little - Test a little


Cath said:
Im sorry but I still don't get you....
I go in Create a query with design view...
but I cannot add a column there....

KARL DEWEY said:
No, insert a new column and paste what I posted editing it to use your field
name.
--
KARL DEWEY
Build a little - Test a little


Cath said:
When you say to add a calculated field ...you mean in the CRITERIA box?

:

I want to sort in ascending order but from the 4th number
I assume that you do not want to ignore the rest of the data in the process
of sorting.
You can open your query in design view and add a calculated field to sort on
like this --
My_Sort: Right([MyDataField],2) & [MyDataField]
I assume that you do not want to ignore the rest of the data in the process
of sorting I added the "& [MyDataField]" for a complete sort.

--
KARL DEWEY
Build a little - Test a little


:

Hi,
I am trying to sort some data in a report. What I am trying to do is for
exemple, I have these datas: 20056, 10048, 60071, 30025

I want to sort in ascending order but from the 4th number, like this:

30025
10048
20056
60071

Is it possible?

Thank you
 
Back
Top