Sorting Days of the Week

P

Pauline Harris

I have created a timetable layout report, but the days of the week are only
sorted in alpha ascending or descending order - how do I change it to Monday
to Friday?
 
D

Duane Hookom

Do you actually store the day name in your field? If so, you need to convert
it using an expression in the sorting and grouping like:

=Instr("sumotuwethfrsa",Left([YourTextDay],2))

BTW: you should be storing a date or a number rather than text day names.
 
P

Pauline Harris

Hi
the database is designed for teachers to use, so the field in the table is a
drop down list for each day of the week (trying to make it idiot proof!) -
sorry but I don't understand the programming - does this go in the sorting
and grouping part of the report, typed into an empty field, do I substitute
my field name where you have "yourtextday" and can you explain what the
"sumotu..." means?

sorry!:)

Duane Hookom said:
Do you actually store the day name in your field? If so, you need to convert
it using an expression in the sorting and grouping like:

=Instr("sumotuwethfrsa",Left([YourTextDay],2))

BTW: you should be storing a date or a number rather than text day names.

--
Duane Hookom
MS Access MVP

Pauline Harris said:
I have created a timetable layout report, but the days of the week are only
sorted in alpha ascending or descending order - how do I change it to
Monday
to Friday?
 
D

Duane Hookom

You can easily always display the day name while storing the day number. You
can use a combo box:
Row Source Type: Value List
Row Source: 1,"Sunday",2,"Monday",3,"Tuesday",....
Column Count: 2
Bound Column: 1
Column Widths: 0", 1"

does this go in the sorting and grouping part of the report: Yes

do I substitute my field name where you have "yourtextday": Yes

can you explain what the "sumotu...": First two letters of each day of the
week

--
Duane Hookom
MS Access MVP


Pauline Harris said:
Hi
the database is designed for teachers to use, so the field in the table is
a
drop down list for each day of the week (trying to make it idiot proof!) -
sorry but I don't understand the programming - does this go in the
sorting
and grouping part of the report, typed into an empty field, do I
substitute
my field name where you have "yourtextday" and can you explain what the
"sumotu..." means?

sorry!:)

Duane Hookom said:
Do you actually store the day name in your field? If so, you need to
convert
it using an expression in the sorting and grouping like:

=Instr("sumotuwethfrsa",Left([YourTextDay],2))

BTW: you should be storing a date or a number rather than text day names.

--
Duane Hookom
MS Access MVP

message
I have created a timetable layout report, but the days of the week are
only
sorted in alpha ascending or descending order - how do I change it to
Monday
to Friday?
 
P

Pauline Harris

Me again - suggestion for the look up column in the table worked great -
transfers across to my user input form etc no problem.

Still having trouble with the report tho'.....when I put the expression into
the sorting and grouping field/expression box I get an error message on
running the report - ORDER BY clause (InStr("motuwethfr",Left(Day,2)))
conflicts with GROUP BY clause

what have I done wrong?

:
?
You can easily always display the day name while storing the day number. You
can use a combo box:
Row Source Type: Value List
Row Source: 1,"Sunday",2,"Monday",3,"Tuesday",....
Column Count: 2
Bound Column: 1
Column Widths: 0", 1"

does this go in the sorting and grouping part of the report: Yes

do I substitute my field name where you have "yourtextday": Yes

can you explain what the "sumotu...": First two letters of each day of the
week

--
Duane Hookom
MS Access MVP


Pauline Harris said:
Hi
the database is designed for teachers to use, so the field in the table is
a
drop down list for each day of the week (trying to make it idiot proof!) -
sorry but I don't understand the programming - does this go in the
sorting
and grouping part of the report, typed into an empty field, do I
substitute
my field name where you have "yourtextday" and can you explain what the
"sumotu..." means?

sorry!:)

Duane Hookom said:
Do you actually store the day name in your field? If so, you need to
convert
it using an expression in the sorting and grouping like:

=Instr("sumotuwethfrsa",Left([YourTextDay],2))

BTW: you should be storing a date or a number rather than text day names.

--
Duane Hookom
MS Access MVP

message
I have created a timetable layout report, but the days of the week are
only
sorted in alpha ascending or descending order - how do I change it to
Monday
to Friday?
 
D

Duane Hookom

If this is a report then do not perform any sorting in the query.

--
Duane Hookom
MS Access MVP

Pauline Harris said:
Me again - suggestion for the look up column in the table worked great -
transfers across to my user input form etc no problem.

Still having trouble with the report tho'.....when I put the expression
into
the sorting and grouping field/expression box I get an error message on
running the report - ORDER BY clause (InStr("motuwethfr",Left(Day,2)))
conflicts with GROUP BY clause

what have I done wrong?

:
?
You can easily always display the day name while storing the day number.
You
can use a combo box:
Row Source Type: Value List
Row Source: 1,"Sunday",2,"Monday",3,"Tuesday",....
Column Count: 2
Bound Column: 1
Column Widths: 0", 1"

does this go in the sorting and grouping part of the report: Yes

do I substitute my field name where you have "yourtextday": Yes

can you explain what the "sumotu...": First two letters of each day of
the
week

--
Duane Hookom
MS Access MVP


message
Hi
the database is designed for teachers to use, so the field in the table
is
a
drop down list for each day of the week (trying to make it idiot
proof!) -
sorry but I don't understand the programming - does this go in the
sorting
and grouping part of the report, typed into an empty field, do I
substitute
my field name where you have "yourtextday" and can you explain what the
"sumotu..." means?

sorry!:)

:

Do you actually store the day name in your field? If so, you need to
convert
it using an expression in the sorting and grouping like:

=Instr("sumotuwethfrsa",Left([YourTextDay],2))

BTW: you should be storing a date or a number rather than text day
names.

--
Duane Hookom
MS Access MVP

message
I have created a timetable layout report, but the days of the week
are
only
sorted in alpha ascending or descending order - how do I change it
to
Monday
to Friday?
 
P

Pauline Harris

No sorting in the query, only instruction running in the query is to enter a
date for week beginning.

Duane Hookom said:
If this is a report then do not perform any sorting in the query.

--
Duane Hookom
MS Access MVP

Pauline Harris said:
Me again - suggestion for the look up column in the table worked great -
transfers across to my user input form etc no problem.

Still having trouble with the report tho'.....when I put the expression
into
the sorting and grouping field/expression box I get an error message on
running the report - ORDER BY clause (InStr("motuwethfr",Left(Day,2)))
conflicts with GROUP BY clause

what have I done wrong?

:
?
You can easily always display the day name while storing the day number.
You
can use a combo box:
Row Source Type: Value List
Row Source: 1,"Sunday",2,"Monday",3,"Tuesday",....
Column Count: 2
Bound Column: 1
Column Widths: 0", 1"

does this go in the sorting and grouping part of the report: Yes

do I substitute my field name where you have "yourtextday": Yes

can you explain what the "sumotu...": First two letters of each day of
the
week

--
Duane Hookom
MS Access MVP


message
Hi
the database is designed for teachers to use, so the field in the table
is
a
drop down list for each day of the week (trying to make it idiot
proof!) -
sorry but I don't understand the programming - does this go in the
sorting
and grouping part of the report, typed into an empty field, do I
substitute
my field name where you have "yourtextday" and can you explain what the
"sumotu..." means?

sorry!:)

:

Do you actually store the day name in your field? If so, you need to
convert
it using an expression in the sorting and grouping like:

=Instr("sumotuwethfrsa",Left([YourTextDay],2))

BTW: you should be storing a date or a number rather than text day
names.

--
Duane Hookom
MS Access MVP

message
I have created a timetable layout report, but the days of the week
are
only
sorted in alpha ascending or descending order - how do I change it
to
Monday
to Friday?
 
D

Duane Hookom

What is the SQL view of your report's record source? What expressions are
you using in the Sorting and Grouping levels?

--
Duane Hookom
MS Access MVP

Pauline Harris said:
No sorting in the query, only instruction running in the query is to enter
a
date for week beginning.

Duane Hookom said:
If this is a report then do not perform any sorting in the query.

--
Duane Hookom
MS Access MVP

message
Me again - suggestion for the look up column in the table worked
great -
transfers across to my user input form etc no problem.

Still having trouble with the report tho'.....when I put the expression
into
the sorting and grouping field/expression box I get an error message on
running the report - ORDER BY clause (InStr("motuwethfr",Left(Day,2)))
conflicts with GROUP BY clause

what have I done wrong?

:
?
You can easily always display the day name while storing the day
number.
You
can use a combo box:
Row Source Type: Value List
Row Source: 1,"Sunday",2,"Monday",3,"Tuesday",....
Column Count: 2
Bound Column: 1
Column Widths: 0", 1"

does this go in the sorting and grouping part of the report: Yes

do I substitute my field name where you have "yourtextday": Yes

can you explain what the "sumotu...": First two letters of each day of
the
week

--
Duane Hookom
MS Access MVP


message
Hi
the database is designed for teachers to use, so the field in the
table
is
a
drop down list for each day of the week (trying to make it idiot
proof!) -
sorry but I don't understand the programming - does this go in the
sorting
and grouping part of the report, typed into an empty field, do I
substitute
my field name where you have "yourtextday" and can you explain what
the
"sumotu..." means?

sorry!:)

:

Do you actually store the day name in your field? If so, you need
to
convert
it using an expression in the sorting and grouping like:

=Instr("sumotuwethfrsa",Left([YourTextDay],2))

BTW: you should be storing a date or a number rather than text day
names.

--
Duane Hookom
MS Access MVP

message
I have created a timetable layout report, but the days of the week
are
only
sorted in alpha ascending or descending order - how do I change
it
to
Monday
to Friday?
 
P

Pauline Harris

hi

report laid out as follows:

page header with teacher name field and wk begin date - no sorting/grouping

expr1 (merged teacher name) header and footer field to print each teacher's
timetable on seperate pages

day header - day field (no footer, group on each value, group interval 1,
keep together no)

detail - fields: period, class, room and resources (ascending sorting in
period to run 1 to 6)

finally, expr1 footer and page footer

does this help?







Duane Hookom said:
What is the SQL view of your report's record source? What expressions are
you using in the Sorting and Grouping levels?

--
Duane Hookom
MS Access MVP

Pauline Harris said:
No sorting in the query, only instruction running in the query is to enter
a
date for week beginning.

Duane Hookom said:
If this is a report then do not perform any sorting in the query.

--
Duane Hookom
MS Access MVP

message
Me again - suggestion for the look up column in the table worked
great -
transfers across to my user input form etc no problem.

Still having trouble with the report tho'.....when I put the expression
into
the sorting and grouping field/expression box I get an error message on
running the report - ORDER BY clause (InStr("motuwethfr",Left(Day,2)))
conflicts with GROUP BY clause

what have I done wrong?

:
?
You can easily always display the day name while storing the day
number.
You
can use a combo box:
Row Source Type: Value List
Row Source: 1,"Sunday",2,"Monday",3,"Tuesday",....
Column Count: 2
Bound Column: 1
Column Widths: 0", 1"

does this go in the sorting and grouping part of the report: Yes

do I substitute my field name where you have "yourtextday": Yes

can you explain what the "sumotu...": First two letters of each day of
the
week

--
Duane Hookom
MS Access MVP


message
Hi
the database is designed for teachers to use, so the field in the
table
is
a
drop down list for each day of the week (trying to make it idiot
proof!) -
sorry but I don't understand the programming - does this go in the
sorting
and grouping part of the report, typed into an empty field, do I
substitute
my field name where you have "yourtextday" and can you explain what
the
"sumotu..." means?

sorry!:)

:

Do you actually store the day name in your field? If so, you need
to
convert
it using an expression in the sorting and grouping like:

=Instr("sumotuwethfrsa",Left([YourTextDay],2))

BTW: you should be storing a date or a number rather than text day
names.

--
Duane Hookom
MS Access MVP

message
I have created a timetable layout report, but the days of the week
are
only
sorted in alpha ascending or descending order - how do I change
it
to
Monday
to Friday?
 
D

Duane Hookom

What is "day header"? I would expect to see the expression that I suggested.

--
Duane Hookom
MS Access MVP

Pauline Harris said:
hi

report laid out as follows:

page header with teacher name field and wk begin date - no
sorting/grouping

expr1 (merged teacher name) header and footer field to print each
teacher's
timetable on seperate pages

day header - day field (no footer, group on each value, group interval 1,
keep together no)

detail - fields: period, class, room and resources (ascending sorting in
period to run 1 to 6)

finally, expr1 footer and page footer

does this help?







Duane Hookom said:
What is the SQL view of your report's record source? What expressions are
you using in the Sorting and Grouping levels?

--
Duane Hookom
MS Access MVP

message
No sorting in the query, only instruction running in the query is to
enter
a
date for week beginning.

:

If this is a report then do not perform any sorting in the query.

--
Duane Hookom
MS Access MVP

message
Me again - suggestion for the look up column in the table worked
great -
transfers across to my user input form etc no problem.

Still having trouble with the report tho'.....when I put the
expression
into
the sorting and grouping field/expression box I get an error message
on
running the report - ORDER BY clause
(InStr("motuwethfr",Left(Day,2)))
conflicts with GROUP BY clause

what have I done wrong?

:
?
You can easily always display the day name while storing the day
number.
You
can use a combo box:
Row Source Type: Value List
Row Source: 1,"Sunday",2,"Monday",3,"Tuesday",....
Column Count: 2
Bound Column: 1
Column Widths: 0", 1"

does this go in the sorting and grouping part of the report: Yes

do I substitute my field name where you have "yourtextday": Yes

can you explain what the "sumotu...": First two letters of each day
of
the
week

--
Duane Hookom
MS Access MVP


message
Hi
the database is designed for teachers to use, so the field in the
table
is
a
drop down list for each day of the week (trying to make it idiot
proof!) -
sorry but I don't understand the programming - does this go in
the
sorting
and grouping part of the report, typed into an empty field, do I
substitute
my field name where you have "yourtextday" and can you explain
what
the
"sumotu..." means?

sorry!:)

:

Do you actually store the day name in your field? If so, you
need
to
convert
it using an expression in the sorting and grouping like:

=Instr("sumotuwethfrsa",Left([YourTextDay],2))

BTW: you should be storing a date or a number rather than text
day
names.

--
Duane Hookom
MS Access MVP

in
message
I have created a timetable layout report, but the days of the
week
are
only
sorted in alpha ascending or descending order - how do I
change
it
to
Monday
to Friday?
 
P

Pauline Harris

Day header is set to show day of the week down left side of timetable - tried
the expression but gave conflict message - see down below so I took it out
(should i have left it in even tho' it didn't work )- although that would
probably be a user problem

would it be easier if you saw the report?



Duane Hookom said:
What is "day header"? I would expect to see the expression that I suggested.

--
Duane Hookom
MS Access MVP

Pauline Harris said:
hi

report laid out as follows:

page header with teacher name field and wk begin date - no
sorting/grouping

expr1 (merged teacher name) header and footer field to print each
teacher's
timetable on seperate pages

day header - day field (no footer, group on each value, group interval 1,
keep together no)

detail - fields: period, class, room and resources (ascending sorting in
period to run 1 to 6)

finally, expr1 footer and page footer

does this help?







Duane Hookom said:
What is the SQL view of your report's record source? What expressions are
you using in the Sorting and Grouping levels?

--
Duane Hookom
MS Access MVP

message
No sorting in the query, only instruction running in the query is to
enter
a
date for week beginning.

:

If this is a report then do not perform any sorting in the query.

--
Duane Hookom
MS Access MVP

message
Me again - suggestion for the look up column in the table worked
great -
transfers across to my user input form etc no problem.

Still having trouble with the report tho'.....when I put the
expression
into
the sorting and grouping field/expression box I get an error message
on
running the report - ORDER BY clause
(InStr("motuwethfr",Left(Day,2)))
conflicts with GROUP BY clause

what have I done wrong?

:
?
You can easily always display the day name while storing the day
number.
You
can use a combo box:
Row Source Type: Value List
Row Source: 1,"Sunday",2,"Monday",3,"Tuesday",....
Column Count: 2
Bound Column: 1
Column Widths: 0", 1"

does this go in the sorting and grouping part of the report: Yes

do I substitute my field name where you have "yourtextday": Yes

can you explain what the "sumotu...": First two letters of each day
of
the
week

--
Duane Hookom
MS Access MVP


message
Hi
the database is designed for teachers to use, so the field in the
table
is
a
drop down list for each day of the week (trying to make it idiot
proof!) -
sorry but I don't understand the programming - does this go in
the
sorting
and grouping part of the report, typed into an empty field, do I
substitute
my field name where you have "yourtextday" and can you explain
what
the
"sumotu..." means?

sorry!:)

:

Do you actually store the day name in your field? If so, you
need
to
convert
it using an expression in the sorting and grouping like:

=Instr("sumotuwethfrsa",Left([YourTextDay],2))

BTW: you should be storing a date or a number rather than text
day
names.

--
Duane Hookom
MS Access MVP

in
message
I have created a timetable layout report, but the days of the
week
are
only
sorted in alpha ascending or descending order - how do I
change
it
to
Monday
to Friday?
 
D

Duane Hookom

Try create a column in your report's record source query
DaySortBy: Instr("sumotuwethfrsa",Left([Day],2))
This assume your date field is named "Day"

Can you then use this field/column for sorting in your report design?


--
Duane Hookom
MS Access MVP

Pauline Harris said:
Day header is set to show day of the week down left side of timetable -
tried
the expression but gave conflict message - see down below so I took it out
(should i have left it in even tho' it didn't work )- although that would
probably be a user problem

would it be easier if you saw the report?



Duane Hookom said:
What is "day header"? I would expect to see the expression that I
suggested.

--
Duane Hookom
MS Access MVP

message
hi

report laid out as follows:

page header with teacher name field and wk begin date - no
sorting/grouping

expr1 (merged teacher name) header and footer field to print each
teacher's
timetable on seperate pages

day header - day field (no footer, group on each value, group interval
1,
keep together no)

detail - fields: period, class, room and resources (ascending sorting
in
period to run 1 to 6)

finally, expr1 footer and page footer

does this help?







:

What is the SQL view of your report's record source? What expressions
are
you using in the Sorting and Grouping levels?

--
Duane Hookom
MS Access MVP

message
No sorting in the query, only instruction running in the query is to
enter
a
date for week beginning.

:

If this is a report then do not perform any sorting in the query.

--
Duane Hookom
MS Access MVP

message
Me again - suggestion for the look up column in the table worked
great -
transfers across to my user input form etc no problem.

Still having trouble with the report tho'.....when I put the
expression
into
the sorting and grouping field/expression box I get an error
message
on
running the report - ORDER BY clause
(InStr("motuwethfr",Left(Day,2)))
conflicts with GROUP BY clause

what have I done wrong?

:
?
You can easily always display the day name while storing the day
number.
You
can use a combo box:
Row Source Type: Value List
Row Source: 1,"Sunday",2,"Monday",3,"Tuesday",....
Column Count: 2
Bound Column: 1
Column Widths: 0", 1"

does this go in the sorting and grouping part of the report: Yes

do I substitute my field name where you have "yourtextday": Yes

can you explain what the "sumotu...": First two letters of each
day
of
the
week

--
Duane Hookom
MS Access MVP


in
message
Hi
the database is designed for teachers to use, so the field in
the
table
is
a
drop down list for each day of the week (trying to make it
idiot
proof!) -
sorry but I don't understand the programming - does this go
in
the
sorting
and grouping part of the report, typed into an empty field, do
I
substitute
my field name where you have "yourtextday" and can you explain
what
the
"sumotu..." means?

sorry!:)

:

Do you actually store the day name in your field? If so, you
need
to
convert
it using an expression in the sorting and grouping like:

=Instr("sumotuwethfrsa",Left([YourTextDay],2))

BTW: you should be storing a date or a number rather than
text
day
names.

--
Duane Hookom
MS Access MVP

"Pauline Harris" <[email protected]>
wrote
in
message
I have created a timetable layout report, but the days of
the
week
are
only
sorted in alpha ascending or descending order - how do I
change
it
to
Monday
to Friday?
 
P

Pauline Harris

That worked brilliantly! Thanks for your help and patience xx

Duane Hookom said:
Try create a column in your report's record source query
DaySortBy: Instr("sumotuwethfrsa",Left([Day],2))
This assume your date field is named "Day"

Can you then use this field/column for sorting in your report design?


--
Duane Hookom
MS Access MVP

Pauline Harris said:
Day header is set to show day of the week down left side of timetable -
tried
the expression but gave conflict message - see down below so I took it out
(should i have left it in even tho' it didn't work )- although that would
probably be a user problem

would it be easier if you saw the report?



Duane Hookom said:
What is "day header"? I would expect to see the expression that I
suggested.

--
Duane Hookom
MS Access MVP

message
hi

report laid out as follows:

page header with teacher name field and wk begin date - no
sorting/grouping

expr1 (merged teacher name) header and footer field to print each
teacher's
timetable on seperate pages

day header - day field (no footer, group on each value, group interval
1,
keep together no)

detail - fields: period, class, room and resources (ascending sorting
in
period to run 1 to 6)

finally, expr1 footer and page footer

does this help?







:

What is the SQL view of your report's record source? What expressions
are
you using in the Sorting and Grouping levels?

--
Duane Hookom
MS Access MVP

message
No sorting in the query, only instruction running in the query is to
enter
a
date for week beginning.

:

If this is a report then do not perform any sorting in the query.

--
Duane Hookom
MS Access MVP

message
Me again - suggestion for the look up column in the table worked
great -
transfers across to my user input form etc no problem.

Still having trouble with the report tho'.....when I put the
expression
into
the sorting and grouping field/expression box I get an error
message
on
running the report - ORDER BY clause
(InStr("motuwethfr",Left(Day,2)))
conflicts with GROUP BY clause

what have I done wrong?

:
?
You can easily always display the day name while storing the day
number.
You
can use a combo box:
Row Source Type: Value List
Row Source: 1,"Sunday",2,"Monday",3,"Tuesday",....
Column Count: 2
Bound Column: 1
Column Widths: 0", 1"

does this go in the sorting and grouping part of the report: Yes

do I substitute my field name where you have "yourtextday": Yes

can you explain what the "sumotu...": First two letters of each
day
of
the
week

--
Duane Hookom
MS Access MVP


in
message
Hi
the database is designed for teachers to use, so the field in
the
table
is
a
drop down list for each day of the week (trying to make it
idiot
proof!) -
sorry but I don't understand the programming - does this go
in
the
sorting
and grouping part of the report, typed into an empty field, do
I
substitute
my field name where you have "yourtextday" and can you explain
what
the
"sumotu..." means?

sorry!:)

:

Do you actually store the day name in your field? If so, you
need
to
convert
it using an expression in the sorting and grouping like:

=Instr("sumotuwethfrsa",Left([YourTextDay],2))

BTW: you should be storing a date or a number rather than
text
day
names.

--
Duane Hookom
MS Access MVP

"Pauline Harris" <[email protected]>
wrote
in
message
I have created a timetable layout report, but the days of
the
week
are
only
sorted in alpha ascending or descending order - how do I
change
it
to
Monday
to Friday?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top