473,386 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Set sort order in MS Access 2000 report

Hello,

I have a report with the Priority field is used as sort order and
grouping. The problem is the data in this Priority field if sorted in
ascending order is: High, Low, and Medium. How could I sort it as:
Low, Medium, High?

Any suggestion is greatly appreciated,
James
Nov 13 '05 #1
11 3850
James, Don't know how you can, but what you could do is base the report on a
query. In the query add the fields you want for your report then add the
below statement to the top row (Field:) of an empty column in you query grid
txtSort:
IIf([Priority]="Low",1,IIf([Priority]="Medium",2,IIf([Priority]="High",3)))

Now you can sort by this field either in the query or via the sorting and
grouping in the report.

Hope this helps!

Reggie

----------
"James P." <ha*********@yahoo.com> wrote in message
news:f4**************************@posting.google.c om...
Hello,

I have a report with the Priority field is used as sort order and
grouping. The problem is the data in this Priority field if sorted in
ascending order is: High, Low, and Medium. How could I sort it as:
Low, Medium, High?

Any suggestion is greatly appreciated,
James

Nov 13 '05 #2
"James P." <ha*********@yahoo.com> wrote in message
news:f4**************************@posting.google.c om
Hello,

I have a report with the Priority field is used as sort order and
grouping. The problem is the data in this Priority field if sorted in
ascending order is: High, Low, and Medium. How could I sort it as:
Low, Medium, High?

Any suggestion is greatly appreciated,
James


You are sorting by a text field. Best to use a numeric code to represent
the levels with a lookup table to get the text, makes sorting much
easier.

eg.
1 High
2 Medium
3 Low
--
regards,

Bradley
Nov 13 '05 #3
"Reggie" <NoSpam_webmaster@NoSpam_smittysinet.com> wrote in message news:<i6********************@comcast.com>...
James, Don't know how you can, but what you could do is base the report on a
query. In the query add the fields you want for your report then add the
below statement to the top row (Field:) of an empty column in you query grid
txtSort:
IIf([Priority]="Low",1,IIf([Priority]="Medium",2,IIf([Priority]="High",3)))

Now you can sort by this field either in the query or via the sorting and
grouping in the report.

Hope this helps!

Reggie

----------
"James P." <ha*********@yahoo.com> wrote in message
news:f4**************************@posting.google.c om...
Hello,

I have a report with the Priority field is used as sort order and
grouping. The problem is the data in this Priority field if sorted in
ascending order is: High, Low, and Medium. How could I sort it as:
Low, Medium, High?

Any suggestion is greatly appreciated,
James


Thank you, Reggie.
Nov 13 '05 #4
"Bradley.-." <sp********@mail.com> wrote in message news:<A3*******************@news-server.bigpond.net.au>...
"James P." <ha*********@yahoo.com> wrote in message
news:f4**************************@posting.google.c om
Hello,

I have a report with the Priority field is used as sort order and
grouping. The problem is the data in this Priority field if sorted in
ascending order is: High, Low, and Medium. How could I sort it as:
Low, Medium, High?

Any suggestion is greatly appreciated,
James


You are sorting by a text field. Best to use a numeric code to represent
the levels with a lookup table to get the text, makes sorting much
easier.

eg.
1 High
2 Medium
3 Low


I followed Reggie's suggestion (and also from Bradley, thank you).
One thing I did not mentioned before was I have another Name sort and
grouping over Priority. Which means Name is the main sort and
grouping, then Priority (I named it PriorityNum). For debugging
purpose, I put PriorityNum (numeric) in both detail line and also in
the grouping header.

Whenever I ran the report, it prompted as: "Enter parameter value:" in
the box title, and it asked for PriorityNum. I entered nothing. The
result I got was the Priority numeric printed correctly at the detail
line, but the grouping header (I put as = [PriorityNum]), it did not
break correctly. For example, it shows PriorityNum as 2 at the header
grouping, but in that detail group, it shows all 2, 1 and 3 mixed up.

Any other suggestions? Thank you in advance.
James
Nov 13 '05 #5
James, I believe that is because you are using a reserved word for your
field "Name". Change this to txtName or something else and see if this
doesn't fix your problem. If not post back!

--
Reggie

----------
"James P." <ha*********@yahoo.com> wrote in message
news:f4**************************@posting.google.c om...
"Bradley.-." <sp********@mail.com> wrote in message

news:<A3*******************@news-server.bigpond.net.au>...
"James P." <ha*********@yahoo.com> wrote in message
news:f4**************************@posting.google.c om
Hello,

I have a report with the Priority field is used as sort order and
grouping. The problem is the data in this Priority field if sorted in
ascending order is: High, Low, and Medium. How could I sort it as:
Low, Medium, High?

Any suggestion is greatly appreciated,
James


You are sorting by a text field. Best to use a numeric code to represent
the levels with a lookup table to get the text, makes sorting much
easier.

eg.
1 High
2 Medium
3 Low


I followed Reggie's suggestion (and also from Bradley, thank you).
One thing I did not mentioned before was I have another Name sort and
grouping over Priority. Which means Name is the main sort and
grouping, then Priority (I named it PriorityNum). For debugging
purpose, I put PriorityNum (numeric) in both detail line and also in
the grouping header.

Whenever I ran the report, it prompted as: "Enter parameter value:" in
the box title, and it asked for PriorityNum. I entered nothing. The
result I got was the Priority numeric printed correctly at the detail
line, but the grouping header (I put as = [PriorityNum]), it did not
break correctly. For example, it shows PriorityNum as 2 at the header
grouping, but in that detail group, it shows all 2, 1 and 3 mixed up.

Any other suggestions? Thank you in advance.
James

Nov 13 '05 #6
"Reggie" <NoSpam_webmaster@NoSpam_smittysinet.com> wrote in message news:<Rc********************@comcast.com>...
James, I believe that is because you are using a reserved word for your
field "Name". Change this to txtName or something else and see if this
doesn't fix your problem. If not post back!

--
Reggie

----------
"James P." <ha*********@yahoo.com> wrote in message
news:f4**************************@posting.google.c om...
"Bradley.-." <sp********@mail.com> wrote in message

news:<A3*******************@news-server.bigpond.net.au>...
"James P." <ha*********@yahoo.com> wrote in message
news:f4**************************@posting.google.c om
> Hello,
>
> I have a report with the Priority field is used as sort order and
> grouping. The problem is the data in this Priority field if sorted in
> ascending order is: High, Low, and Medium. How could I sort it as:
> Low, Medium, High?
>
> Any suggestion is greatly appreciated,
> James

You are sorting by a text field. Best to use a numeric code to represent
the levels with a lookup table to get the text, makes sorting much
easier.

eg.
1 High
2 Medium
3 Low


I followed Reggie's suggestion (and also from Bradley, thank you).
One thing I did not mentioned before was I have another Name sort and
grouping over Priority. Which means Name is the main sort and
grouping, then Priority (I named it PriorityNum). For debugging
purpose, I put PriorityNum (numeric) in both detail line and also in
the grouping header.

Whenever I ran the report, it prompted as: "Enter parameter value:" in
the box title, and it asked for PriorityNum. I entered nothing. The
result I got was the Priority numeric printed correctly at the detail
line, but the grouping header (I put as = [PriorityNum]), it did not
break correctly. For example, it shows PriorityNum as 2 at the header
grouping, but in that detail group, it shows all 2, 1 and 3 mixed up.

Any other suggestions? Thank you in advance.
James


Reggie,

In my program, I used txtAssignee instead of Name. Sorry, for the
confusion in my email when I tried to make it simple by using Name
instead of the real field name. So, here is my layout is supposed to
look like:

1) First sort and grouping: txtAssignee : in header group 1.
2) Second sort and grouping: txtPriority = [PriorityNum]. This part
is in the header group 2.
PriorityNum = Your IIF statement that you gave me.

James
Nov 13 '05 #7
James, Open your sorting & grouping box. Now select the txtAssignee first
from the drop down list then the txtPriority or PriorityNum second. From
your post a I can't tell what the control is because of this statement
"txtPriority = [PriorityNum]". It sounds like you are trying to group by
[PriorityNum] in you sorting & grouping box, but that field doesn't exist in
your recordsource anymore because you renamed it to txtPriority in the
query. Hope this helps, if not post back!

1) First sort and grouping: txtAssignee : in header group 1.
2) Second sort and grouping: txtPriority = [PriorityNum]. This part
is in the header group 2.
PriorityNum = Your IIF statement that you gave me.

--
Reggie

----------
"James P." <ha*********@yahoo.com> wrote in message
news:f4**************************@posting.google.c om... "Reggie" <NoSpam_webmaster@NoSpam_smittysinet.com> wrote in message

news:<Rc********************@comcast.com>...
James, I believe that is because you are using a reserved word for your
field "Name". Change this to txtName or something else and see if this
doesn't fix your problem. If not post back!

--
Reggie

----------
"James P." <ha*********@yahoo.com> wrote in message
news:f4**************************@posting.google.c om...
"Bradley.-." <sp********@mail.com> wrote in message

news:<A3*******************@news-server.bigpond.net.au>...
> "James P." <ha*********@yahoo.com> wrote in message
> news:f4**************************@posting.google.c om
> > Hello,
> >
> > I have a report with the Priority field is used as sort order and
> > grouping. The problem is the data in this Priority field if sorted in > > ascending order is: High, Low, and Medium. How could I sort it as: > > Low, Medium, High?
> >
> > Any suggestion is greatly appreciated,
> > James
>
> You are sorting by a text field. Best to use a numeric code to represent > the levels with a lookup table to get the text, makes sorting much
> easier.
>
> eg.
> 1 High
> 2 Medium
> 3 Low

I followed Reggie's suggestion (and also from Bradley, thank you).
One thing I did not mentioned before was I have another Name sort and
grouping over Priority. Which means Name is the main sort and
grouping, then Priority (I named it PriorityNum). For debugging
purpose, I put PriorityNum (numeric) in both detail line and also in
the grouping header.

Whenever I ran the report, it prompted as: "Enter parameter value:" in
the box title, and it asked for PriorityNum. I entered nothing. The
result I got was the Priority numeric printed correctly at the detail
line, but the grouping header (I put as = [PriorityNum]), it did not
break correctly. For example, it shows PriorityNum as 2 at the header
grouping, but in that detail group, it shows all 2, 1 and 3 mixed up.

Any other suggestions? Thank you in advance.
James


Reggie,

In my program, I used txtAssignee instead of Name. Sorry, for the
confusion in my email when I tried to make it simple by using Name
instead of the real field name. So, here is my layout is supposed to
look like:

1) First sort and grouping: txtAssignee : in header group 1.
2) Second sort and grouping: txtPriority = [PriorityNum]. This part
is in the header group 2.
PriorityNum = Your IIF statement that you gave me.

James

Nov 13 '05 #8
"Reggie" <NoSpam_webmaster@NoSpam_smittysinet.com> wrote in message news:<OL********************@comcast.com>...
James, Open your sorting & grouping box. Now select the txtAssignee first
from the drop down list then the txtPriority or PriorityNum second. From
your post a I can't tell what the control is because of this statement
"txtPriority = [PriorityNum]". It sounds like you are trying to group by
[PriorityNum] in you sorting & grouping box, but that field doesn't exist in
your recordsource anymore because you renamed it to txtPriority in the
query. Hope this helps, if not post back!

1) First sort and grouping: txtAssignee : in header group 1.
2) Second sort and grouping: txtPriority = [PriorityNum]. This part
is in the header group 2.
PriorityNum = Your IIF statement that you gave me.

--
Reggie

----------
"James P." <ha*********@yahoo.com> wrote in message
news:f4**************************@posting.google.c om...
"Reggie" <NoSpam_webmaster@NoSpam_smittysinet.com> wrote in message

news:<Rc********************@comcast.com>...
James, I believe that is because you are using a reserved word for your
field "Name". Change this to txtName or something else and see if this
doesn't fix your problem. If not post back!

--
Reggie

----------
"James P." <ha*********@yahoo.com> wrote in message
news:f4**************************@posting.google.c om...
> "Bradley.-." <sp********@mail.com> wrote in message news:<A3*******************@news-server.bigpond.net.au>... > > "James P." <ha*********@yahoo.com> wrote in message
> > news:f4**************************@posting.google.c om
> > > Hello,
> > >
> > > I have a report with the Priority field is used as sort order and
> > > grouping. The problem is the data in this Priority field if sorted in > > > ascending order is: High, Low, and Medium. How could I sort it as: > > > Low, Medium, High?
> > >
> > > Any suggestion is greatly appreciated,
> > > James
> >
> > You are sorting by a text field. Best to use a numeric code to represent > > the levels with a lookup table to get the text, makes sorting much
> > easier.
> >
> > eg.
> > 1 High
> > 2 Medium
> > 3 Low
>
> I followed Reggie's suggestion (and also from Bradley, thank you).
> One thing I did not mentioned before was I have another Name sort and
> grouping over Priority. Which means Name is the main sort and
> grouping, then Priority (I named it PriorityNum). For debugging
> purpose, I put PriorityNum (numeric) in both detail line and also in
> the grouping header.
>
> Whenever I ran the report, it prompted as: "Enter parameter value:" in
> the box title, and it asked for PriorityNum. I entered nothing. The
> result I got was the Priority numeric printed correctly at the detail
> line, but the grouping header (I put as = [PriorityNum]), it did not
> break correctly. For example, it shows PriorityNum as 2 at the header
> grouping, but in that detail group, it shows all 2, 1 and 3 mixed up.
>
> Any other suggestions? Thank you in advance.
> James


Reggie,

In my program, I used txtAssignee instead of Name. Sorry, for the
confusion in my email when I tried to make it simple by using Name
instead of the real field name. So, here is my layout is supposed to
look like:

1) First sort and grouping: txtAssignee : in header group 1.
2) Second sort and grouping: txtPriority = [PriorityNum]. This part
is in the header group 2.
PriorityNum = Your IIF statement that you gave me.

James


Reggie,

I used txtPriority as group header 2. It refers to PriorityNum in the
detail line. PriorityNum is defined with your IIF statement. Neither
PriorityNum nor TxtPriority shown in the dropdown list of Sorting &
Grouping. I guess because these two fields I defined it myself and
they are not part of the SQL table I used for the report.

Plus, it keeps asking me to enter value for txtPriority. I just
clicked Ok without entering any value and I still have the same
problem of mixed up priority number in my detail line.
James
Nov 13 '05 #9
James, Lets try this! It sounds like you are typing txtPriority =
[PriorityNum] on the second line of the sort/group box and these are both
unbound controls on your report. Instead of that Open your report and open
the sorting/grouping box. Remove what you have on the second line and type
in exactly what Is below (which is probably what you have the control source
of your unbound [PriorityNum] set to).

=IIf([Priority]="Low",1,IIf([Priority]="Medium",2,IIf([Priority]="High",3)))

This should do what you want. If you set this second sort/group to Group
Header=Yes you will see the statement above as the title for the header.

--
Reggie

----------
"James P." <ha*********@yahoo.com> wrote in message
news:f4**************************@posting.google.c om...
"Reggie" <NoSpam_webmaster@NoSpam_smittysinet.com> wrote in message

news:<OL********************@comcast.com>...
James, Open your sorting & grouping box. Now select the txtAssignee first from the drop down list then the txtPriority or PriorityNum second. From your post a I can't tell what the control is because of this statement
"txtPriority = [PriorityNum]". It sounds like you are trying to group by [PriorityNum] in you sorting & grouping box, but that field doesn't exist in your recordsource anymore because you renamed it to txtPriority in the
query. Hope this helps, if not post back!

1) First sort and grouping: txtAssignee : in header group 1.
2) Second sort and grouping: txtPriority = [PriorityNum]. This part
is in the header group 2.
PriorityNum = Your IIF statement that you gave me.

--
Reggie

----------
"James P." <ha*********@yahoo.com> wrote in message
news:f4**************************@posting.google.c om...
"Reggie" <NoSpam_webmaster@NoSpam_smittysinet.com> wrote in message

news:<Rc********************@comcast.com>...
> James, I believe that is because you are using a reserved word for your > field "Name". Change this to txtName or something else and see if this > doesn't fix your problem. If not post back!
>
> --
> Reggie
>
> ----------
> "James P." <ha*********@yahoo.com> wrote in message
> news:f4**************************@posting.google.c om...
> > "Bradley.-." <sp********@mail.com> wrote in message

news:<A3*******************@news-server.bigpond.net.au>...
> > > "James P." <ha*********@yahoo.com> wrote in message
> > > news:f4**************************@posting.google.c om
> > > > Hello,
> > > >
> > > > I have a report with the Priority field is used as sort order and > > > > grouping. The problem is the data in this Priority field if

sorted in
> > > > ascending order is: High, Low, and Medium. How could I sort it
as:
> > > > Low, Medium, High?
> > > >
> > > > Any suggestion is greatly appreciated,
> > > > James
> > >
> > > You are sorting by a text field. Best to use a numeric code to

represent
> > > the levels with a lookup table to get the text, makes sorting

much > > > easier.
> > >
> > > eg.
> > > 1 High
> > > 2 Medium
> > > 3 Low
> >
> > I followed Reggie's suggestion (and also from Bradley, thank you).
> > One thing I did not mentioned before was I have another Name sort and > > grouping over Priority. Which means Name is the main sort and
> > grouping, then Priority (I named it PriorityNum). For debugging
> > purpose, I put PriorityNum (numeric) in both detail line and also in > > the grouping header.
> >
> > Whenever I ran the report, it prompted as: "Enter parameter value:" in > > the box title, and it asked for PriorityNum. I entered nothing. The > > result I got was the Priority numeric printed correctly at the detail > > line, but the grouping header (I put as = [PriorityNum]), it did not > > break correctly. For example, it shows PriorityNum as 2 at the header > > grouping, but in that detail group, it shows all 2, 1 and 3 mixed up. > >
> > Any other suggestions? Thank you in advance.
> > James

Reggie,

In my program, I used txtAssignee instead of Name. Sorry, for the
confusion in my email when I tried to make it simple by using Name
instead of the real field name. So, here is my layout is supposed to
look like:

1) First sort and grouping: txtAssignee : in header group 1.
2) Second sort and grouping: txtPriority = [PriorityNum]. This part
is in the header group 2.
PriorityNum = Your IIF statement that you gave me.

James


Reggie,

I used txtPriority as group header 2. It refers to PriorityNum in the
detail line. PriorityNum is defined with your IIF statement. Neither
PriorityNum nor TxtPriority shown in the dropdown list of Sorting &
Grouping. I guess because these two fields I defined it myself and
they are not part of the SQL table I used for the report.

Plus, it keeps asking me to enter value for txtPriority. I just
clicked Ok without entering any value and I still have the same
problem of mixed up priority number in my detail line.
James

Nov 13 '05 #10
"Reggie" <NoSpam_chief123101@NoSpam_yahoo.com> wrote in message news:<cp********************@comcast.com>...
James, Lets try this! It sounds like you are typing txtPriority =
[PriorityNum] on the second line of the sort/group box and these are both
unbound controls on your report. Instead of that Open your report and open
the sorting/grouping box. Remove what you have on the second line and type
in exactly what Is below (which is probably what you have the control source
of your unbound [PriorityNum] set to).

=IIf([Priority]="Low",1,IIf([Priority]="Medium",2,IIf([Priority]="High",3)))

This should do what you want. If you set this second sort/group to Group
Header=Yes you will see the statement above as the title for the header.

--
Reggie

----------
"James P." <ha*********@yahoo.com> wrote in message
news:f4**************************@posting.google.c om...
"Reggie" <NoSpam_webmaster@NoSpam_smittysinet.com> wrote in message

news:<OL********************@comcast.com>...
James, Open your sorting & grouping box. Now select the txtAssignee first from the drop down list then the txtPriority or PriorityNum second. From your post a I can't tell what the control is because of this statement
"txtPriority = [PriorityNum]". It sounds like you are trying to group by [PriorityNum] in you sorting & grouping box, but that field doesn't exist in your recordsource anymore because you renamed it to txtPriority in the
query. Hope this helps, if not post back!
> 1) First sort and grouping: txtAssignee : in header group 1.
> 2) Second sort and grouping: txtPriority = [PriorityNum]. This part
> is in the header group 2.
> PriorityNum = Your IIF statement that you gave me.
--
Reggie

----------
"James P." <ha*********@yahoo.com> wrote in message
news:f4**************************@posting.google.c om...
> "Reggie" <NoSpam_webmaster@NoSpam_smittysinet.com> wrote in message news:<Rc********************@comcast.com>... > > James, I believe that is because you are using a reserved word for your > > field "Name". Change this to txtName or something else and see if this > > doesn't fix your problem. If not post back!
> >
> > --
> > Reggie
> >
> > ----------
> > "James P." <ha*********@yahoo.com> wrote in message
> > news:f4**************************@posting.google.c om...
> > > "Bradley.-." <sp********@mail.com> wrote in message news:<A3*******************@news-server.bigpond.net.au>... > > > > "James P." <ha*********@yahoo.com> wrote in message
> > > > news:f4**************************@posting.google.c om
> > > > > Hello,
> > > > >
> > > > > I have a report with the Priority field is used as sort order and > > > > > grouping. The problem is the data in this Priority field if sorted in > > > > > ascending order is: High, Low, and Medium. How could I sort it
as: > > > > > Low, Medium, High?
> > > > >
> > > > > Any suggestion is greatly appreciated,
> > > > > James
> > > >
> > > > You are sorting by a text field. Best to use a numeric code to represent > > > > the levels with a lookup table to get the text, makes sorting much > > > > easier.
> > > >
> > > > eg.
> > > > 1 High
> > > > 2 Medium
> > > > 3 Low
> > >
> > > I followed Reggie's suggestion (and also from Bradley, thank you).
> > > One thing I did not mentioned before was I have another Name sort and > > > grouping over Priority. Which means Name is the main sort and
> > > grouping, then Priority (I named it PriorityNum). For debugging
> > > purpose, I put PriorityNum (numeric) in both detail line and also in > > > the grouping header.
> > >
> > > Whenever I ran the report, it prompted as: "Enter parameter value:" in > > > the box title, and it asked for PriorityNum. I entered nothing. The > > > result I got was the Priority numeric printed correctly at the detail > > > line, but the grouping header (I put as = [PriorityNum]), it did not > > > break correctly. For example, it shows PriorityNum as 2 at the header > > > grouping, but in that detail group, it shows all 2, 1 and 3 mixed up. > > >
> > > Any other suggestions? Thank you in advance.
> > > James
>
> Reggie,
>
> In my program, I used txtAssignee instead of Name. Sorry, for the
> confusion in my email when I tried to make it simple by using Name
> instead of the real field name. So, here is my layout is supposed to
> look like:
>
> 1) First sort and grouping: txtAssignee : in header group 1.
> 2) Second sort and grouping: txtPriority = [PriorityNum]. This part
> is in the header group 2.
> PriorityNum = Your IIF statement that you gave me.
>
> James


Reggie,

I used txtPriority as group header 2. It refers to PriorityNum in the
detail line. PriorityNum is defined with your IIF statement. Neither
PriorityNum nor TxtPriority shown in the dropdown list of Sorting &
Grouping. I guess because these two fields I defined it myself and
they are not part of the SQL table I used for the report.

Plus, it keeps asking me to enter value for txtPriority. I just
clicked Ok without entering any value and I still have the same
problem of mixed up priority number in my detail line.
James


Reggie,

Yes, it worked now with your last solution. Thank you so much for
helping me for the last several days. Sorry for the confusion. I
know if I could describe the problem clearly in the first place, you
could have showed me at one shot.

Again, thank you for being patient and helping. Wish you're nearby, I
could have bought you a drink.

James
Nov 13 '05 #11
James, No problem. Glad to help any time! Took us a little while but we
got there! Take care!

--
Reggie

----------
"James P." <ha*********@yahoo.com> wrote in message
news:f4**************************@posting.google.c om...
"Reggie" <NoSpam_chief123101@NoSpam_yahoo.com> wrote in message

news:<cp********************@comcast.com>...
James, Lets try this! It sounds like you are typing txtPriority =
[PriorityNum] on the second line of the sort/group box and these are both unbound controls on your report. Instead of that Open your report and open the sorting/grouping box. Remove what you have on the second line and type in exactly what Is below (which is probably what you have the control source of your unbound [PriorityNum] set to).

=IIf([Priority]="Low",1,IIf([Priority]="Medium",2,IIf([Priority]="High",3)))
This should do what you want. If you set this second sort/group to Group Header=Yes you will see the statement above as the title for the header.

--
Reggie

----------
"James P." <ha*********@yahoo.com> wrote in message
news:f4**************************@posting.google.c om...
"Reggie" <NoSpam_webmaster@NoSpam_smittysinet.com> wrote in message

news:<OL********************@comcast.com>...
> James, Open your sorting & grouping box. Now select the txtAssignee
first
> from the drop down list then the txtPriority or PriorityNum second.

From
> your post a I can't tell what the control is because of this
statement > "txtPriority = [PriorityNum]". It sounds like you are trying to group by
> [PriorityNum] in you sorting & grouping box, but that field doesn't

exist in
> your recordsource anymore because you renamed it to txtPriority in
the > query. Hope this helps, if not post back!
>
>
> > 1) First sort and grouping: txtAssignee : in header group 1.
> > 2) Second sort and grouping: txtPriority = [PriorityNum]. This part > > is in the header group 2.
> > PriorityNum = Your IIF statement that you gave me.
>
>
> --
> Reggie
>
> ----------
> "James P." <ha*********@yahoo.com> wrote in message
> news:f4**************************@posting.google.c om...
> > "Reggie" <NoSpam_webmaster@NoSpam_smittysinet.com> wrote in message news:<Rc********************@comcast.com>...
> > > James, I believe that is because you are using a reserved word
for your
> > > field "Name". Change this to txtName or something else and see
if this
> > > doesn't fix your problem. If not post back!
> > >
> > > --
> > > Reggie
> > >
> > > ----------
> > > "James P." <ha*********@yahoo.com> wrote in message
> > > news:f4**************************@posting.google.c om...
> > > > "Bradley.-." <sp********@mail.com> wrote in message

news:<A3*******************@news-server.bigpond.net.au>...
> > > > > "James P." <ha*********@yahoo.com> wrote in message
> > > > > news:f4**************************@posting.google.c om
> > > > > > Hello,
> > > > > >
> > > > > > I have a report with the Priority field is used as sort
order and
> > > > > > grouping. The problem is the data in this Priority field
if sorted in
> > > > > > ascending order is: High, Low, and Medium. How could I
sort it
as:
> > > > > > Low, Medium, High?
> > > > > >
> > > > > > Any suggestion is greatly appreciated,
> > > > > > James
> > > > >
> > > > > You are sorting by a text field. Best to use a numeric code
to represent
> > > > > the levels with a lookup table to get the text, makes
sorting much
> > > > > easier.
> > > > >
> > > > > eg.
> > > > > 1 High
> > > > > 2 Medium
> > > > > 3 Low
> > > >
> > > > I followed Reggie's suggestion (and also from Bradley, thank
you). > > > > One thing I did not mentioned before was I have another Name sort and
> > > > grouping over Priority. Which means Name is the main sort and
> > > > grouping, then Priority (I named it PriorityNum). For
debugging > > > > purpose, I put PriorityNum (numeric) in both detail line and also in
> > > > the grouping header.
> > > >
> > > > Whenever I ran the report, it prompted as: "Enter parameter

value:" in
> > > > the box title, and it asked for PriorityNum. I entered
nothing. The
> > > > result I got was the Priority numeric printed correctly at the

detail
> > > > line, but the grouping header (I put as = [PriorityNum]), it
did not
> > > > break correctly. For example, it shows PriorityNum as 2 at
the header
> > > > grouping, but in that detail group, it shows all 2, 1 and 3
mixed up.
> > > >
> > > > Any other suggestions? Thank you in advance.
> > > > James
> >
> > Reggie,
> >
> > In my program, I used txtAssignee instead of Name. Sorry, for the
> > confusion in my email when I tried to make it simple by using Name
> > instead of the real field name. So, here is my layout is supposed

to > > look like:
> >
> > 1) First sort and grouping: txtAssignee : in header group 1.
> > 2) Second sort and grouping: txtPriority = [PriorityNum]. This part > > is in the header group 2.
> > PriorityNum = Your IIF statement that you gave me.
> >
> > James

Reggie,

I used txtPriority as group header 2. It refers to PriorityNum in the
detail line. PriorityNum is defined with your IIF statement. Neither
PriorityNum nor TxtPriority shown in the dropdown list of Sorting &
Grouping. I guess because these two fields I defined it myself and
they are not part of the SQL table I used for the report.

Plus, it keeps asking me to enter value for txtPriority. I just
clicked Ok without entering any value and I still have the same
problem of mixed up priority number in my detail line.
James


Reggie,

Yes, it worked now with your last solution. Thank you so much for
helping me for the last several days. Sorry for the confusion. I
know if I could describe the problem clearly in the first place, you
could have showed me at one shot.

Again, thank you for being patient and helping. Wish you're nearby, I
could have bought you a drink.

James

Nov 13 '05 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Alpay Eno | last post by:
Hello all... I'm using asp to get records from an access database, very similar to the way datagrid would work. The title of each column in my table is a link that alternates the sort order between...
4
by: Matt | last post by:
Hi all, We recently upsized two Microsoft Access Databases to SQL. We're using an ADP (2002) as the front end. All the conversion issues have been resolved, except for one: Whenever we...
3
by: Charles | last post by:
I am trying to add the ability for a user to change the order in which the elements are listed in a dropdown list box. Before I added the ListID field the dropdown list box order was controlled...
1
by: Rene | last post by:
I have another post regarding this "attendance" report of mine...this one concerns one of my sub-reports. It loses its alphabetical sorting when inserted in the master report. When run...
5
by: Terri | last post by:
The following query will give me the top ten states with the most callers. SELECT TOP 10 Count(Callers.CallerID) AS CountOfCallerID, Callers.State FROM Callers GROUP BY Callers.State ORDER BY...
21
by: yeti349 | last post by:
Hi, I'm using the following code to retrieve data from an xml file and populate a javascript array. The data is then displayed in html table form. I would like to then be able to sort by each...
6
by: Julian | last post by:
Hi, I am a very beginner in databases. I created a database table in Access 2003 and OOo 2.03 that includes name, address, postcode, phone numbers etc of our customers. I would like to sort...
3
by: HowHow | last post by:
I need to sort the "DateOfBirth" by the day (dd) regarless of month (mm)and year (yyyy). I have a query called q_DC_Client, in criteria, I am using this code below: Like "*" & "/" & !! & "/" & "*"...
4
by: HowHow | last post by:
Using Access 2000. I need to group the address by suburb then by street name in my report. Two major problems here: 1. Unit number has the word "Unit" before number 2. Semi detach house has "a"...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.