Month order on Report

G

Guest

I have designed a Report with a Field called "Month Due" as the Header. When
I run the report the Months are sorted in Alpha order. I would like the
Months to be listed from January to December.
Is there a way that this can be achieved?
Thanks in advance for any guidance
 
D

Duane Hookom

You can only sort a report based on values in the report's record source. I
expect your Month Due was calculated from a real date field. Set your
sorting and grouping expression to:
=Format([Real Date Field], "yyyymm")
 
G

Guest

Thanks Duane. It is actually a seperate Table with the Months already entered
as Text and a Combo Box on the Main Form. Is there any other way around this?
Much appreciated

Duane Hookom said:
You can only sort a report based on values in the report's record source. I
expect your Month Due was calculated from a real date field. Set your
sorting and grouping expression to:
=Format([Real Date Field], "yyyymm")

--
Duane Hookom
MS Access MVP

Roger Bell said:
I have designed a Report with a Field called "Month Due" as the Header.
When
I run the report the Months are sorted in Alpha order. I would like the
Months to be listed from January to December.
Is there a way that this can be achieved?
Thanks in advance for any guidance
 
D

Duane Hookom

Are you actually storing a month name or text in your table? If you want to
store any part of a date, you should be storing a number. Forms and reports
can always "display" a text value based on the number.

If you can't find a numeric value in your tables then you need to convert
your text to a number. It isn't clear if you stored the entire month name or
just the first three characters. If you stored the entire month name, you
can set your sorting and grouping to an expression like:
=Instr(Left([Month Due], 3), "JanFebMar...Dec")

--
Duane Hookom
MS Access MVP

Roger Bell said:
Thanks Duane. It is actually a seperate Table with the Months already
entered
as Text and a Combo Box on the Main Form. Is there any other way around
this?
Much appreciated

Duane Hookom said:
You can only sort a report based on values in the report's record source.
I
expect your Month Due was calculated from a real date field. Set your
sorting and grouping expression to:
=Format([Real Date Field], "yyyymm")

--
Duane Hookom
MS Access MVP

Roger Bell said:
I have designed a Report with a Field called "Month Due" as the Header.
When
I run the report the Months are sorted in Alpha order. I would like
the
Months to be listed from January to December.
Is there a way that this can be achieved?
Thanks in advance for any guidance
 
G

Guest

The Month Names are typed in a Table as January, February, March etc and the
Field type is "Text".
Have tried the Expression as you suggested, but the result lists everything
under "June"
I wrote the Expression as follows in the "Sorting and Grouping" section:

=Insrt(Left([Month Due], 3), "JanFebMarAprMayJunJulAugSepOctNovDec")

Where am I going wrong and thanks for your patience


Duane Hookom said:
Are you actually storing a month name or text in your table? If you want to
store any part of a date, you should be storing a number. Forms and reports
can always "display" a text value based on the number.

If you can't find a numeric value in your tables then you need to convert
your text to a number. It isn't clear if you stored the entire month name or
just the first three characters. If you stored the entire month name, you
can set your sorting and grouping to an expression like:
=Instr(Left([Month Due], 3), "JanFebMar...Dec")

--
Duane Hookom
MS Access MVP

Roger Bell said:
Thanks Duane. It is actually a seperate Table with the Months already
entered
as Text and a Combo Box on the Main Form. Is there any other way around
this?
Much appreciated

Duane Hookom said:
You can only sort a report based on values in the report's record source.
I
expect your Month Due was calculated from a real date field. Set your
sorting and grouping expression to:
=Format([Real Date Field], "yyyymm")

--
Duane Hookom
MS Access MVP

I have designed a Report with a Field called "Month Due" as the Header.
When
I run the report the Months are sorted in Alpha order. I would like
the
Months to be listed from January to December.
Is there a way that this can be achieved?
Thanks in advance for any guidance
 
D

Duane Hookom

The expression should be:
=Instr(Left([Month Due], 3), "JanFebMarAprMayJunJulAugSepOctNovDec")
This function should return values like 1,4,7,... for the months.


--
Duane Hookom
MS Access MVP

Roger Bell said:
The Month Names are typed in a Table as January, February, March etc and
the
Field type is "Text".
Have tried the Expression as you suggested, but the result lists
everything
under "June"
I wrote the Expression as follows in the "Sorting and Grouping" section:

=Insrt(Left([Month Due], 3), "JanFebMarAprMayJunJulAugSepOctNovDec")

Where am I going wrong and thanks for your patience


Duane Hookom said:
Are you actually storing a month name or text in your table? If you want
to
store any part of a date, you should be storing a number. Forms and
reports
can always "display" a text value based on the number.

If you can't find a numeric value in your tables then you need to convert
your text to a number. It isn't clear if you stored the entire month name
or
just the first three characters. If you stored the entire month name, you
can set your sorting and grouping to an expression like:
=Instr(Left([Month Due], 3), "JanFebMar...Dec")

--
Duane Hookom
MS Access MVP

Roger Bell said:
Thanks Duane. It is actually a seperate Table with the Months already
entered
as Text and a Combo Box on the Main Form. Is there any other way
around
this?
Much appreciated

:

You can only sort a report based on values in the report's record
source.
I
expect your Month Due was calculated from a real date field. Set your
sorting and grouping expression to:
=Format([Real Date Field], "yyyymm")

--
Duane Hookom
MS Access MVP

I have designed a Report with a Field called "Month Due" as the
Header.
When
I run the report the Months are sorted in Alpha order. I would like
the
Months to be listed from January to December.
Is there a way that this can be achieved?
Thanks in advance for any guidance
 
G

Guest

Thanks again Duane, but still having a problem. The value is returned as the
First month of the Year ie. January and every item is listed under January.
The Subform has a combo box to lookup the value in a Table called "Month Due"
which stores all the Months of the Year. It is the only field in the table,
is a Text field and the Months are entered in full.
Sorry to be a nuisance

Duane Hookom said:
The expression should be:
=Instr(Left([Month Due], 3), "JanFebMarAprMayJunJulAugSepOctNovDec")
This function should return values like 1,4,7,... for the months.


--
Duane Hookom
MS Access MVP

Roger Bell said:
The Month Names are typed in a Table as January, February, March etc and
the
Field type is "Text".
Have tried the Expression as you suggested, but the result lists
everything
under "June"
I wrote the Expression as follows in the "Sorting and Grouping" section:

=Insrt(Left([Month Due], 3), "JanFebMarAprMayJunJulAugSepOctNovDec")

Where am I going wrong and thanks for your patience


Duane Hookom said:
Are you actually storing a month name or text in your table? If you want
to
store any part of a date, you should be storing a number. Forms and
reports
can always "display" a text value based on the number.

If you can't find a numeric value in your tables then you need to convert
your text to a number. It isn't clear if you stored the entire month name
or
just the first three characters. If you stored the entire month name, you
can set your sorting and grouping to an expression like:
=Instr(Left([Month Due], 3), "JanFebMar...Dec")

--
Duane Hookom
MS Access MVP

Thanks Duane. It is actually a seperate Table with the Months already
entered
as Text and a Combo Box on the Main Form. Is there any other way
around
this?
Much appreciated

:

You can only sort a report based on values in the report's record
source.
I
expect your Month Due was calculated from a real date field. Set your
sorting and grouping expression to:
=Format([Real Date Field], "yyyymm")

--
Duane Hookom
MS Access MVP

I have designed a Report with a Field called "Month Due" as the
Header.
When
I run the report the Months are sorted in Alpha order. I would like
the
Months to be listed from January to December.
Is there a way that this can be achieved?
Thanks in advance for any guidance
 
D

Duane Hookom

My bad... try
=Instr( "JanFebMarAprMayJunJulAugSepOctNovDec",Left([Month Due], 3))


--
Duane Hookom
MS Access MVP


Roger Bell said:
Thanks again Duane, but still having a problem. The value is returned as
the
First month of the Year ie. January and every item is listed under
January.
The Subform has a combo box to lookup the value in a Table called "Month
Due"
which stores all the Months of the Year. It is the only field in the
table,
is a Text field and the Months are entered in full.
Sorry to be a nuisance

Duane Hookom said:
The expression should be:
=Instr(Left([Month Due], 3), "JanFebMarAprMayJunJulAugSepOctNovDec")
This function should return values like 1,4,7,... for the months.


--
Duane Hookom
MS Access MVP

Roger Bell said:
The Month Names are typed in a Table as January, February, March etc
and
the
Field type is "Text".
Have tried the Expression as you suggested, but the result lists
everything
under "June"
I wrote the Expression as follows in the "Sorting and Grouping"
section:

=Insrt(Left([Month Due], 3), "JanFebMarAprMayJunJulAugSepOctNovDec")

Where am I going wrong and thanks for your patience


:

Are you actually storing a month name or text in your table? If you
want
to
store any part of a date, you should be storing a number. Forms and
reports
can always "display" a text value based on the number.

If you can't find a numeric value in your tables then you need to
convert
your text to a number. It isn't clear if you stored the entire month
name
or
just the first three characters. If you stored the entire month name,
you
can set your sorting and grouping to an expression like:
=Instr(Left([Month Due], 3), "JanFebMar...Dec")

--
Duane Hookom
MS Access MVP

Thanks Duane. It is actually a seperate Table with the Months
already
entered
as Text and a Combo Box on the Main Form. Is there any other way
around
this?
Much appreciated

:

You can only sort a report based on values in the report's record
source.
I
expect your Month Due was calculated from a real date field. Set
your
sorting and grouping expression to:
=Format([Real Date Field], "yyyymm")

--
Duane Hookom
MS Access MVP

I have designed a Report with a Field called "Month Due" as the
Header.
When
I run the report the Months are sorted in Alpha order. I would
like
the
Months to be listed from January to December.
Is there a way that this can be achieved?
Thanks in advance for any guidance
 
G

Guest

Excellent, Thanks Duane. May your days be filled with Health, Peace and
Happiness


Roger Bell said:
Thanks again Duane, but still having a problem. The value is returned as the
First month of the Year ie. January and every item is listed under January.
The Subform has a combo box to lookup the value in a Table called "Month Due"
which stores all the Months of the Year. It is the only field in the table,
is a Text field and the Months are entered in full.
Sorry to be a nuisance

Duane Hookom said:
The expression should be:
=Instr(Left([Month Due], 3), "JanFebMarAprMayJunJulAugSepOctNovDec")
This function should return values like 1,4,7,... for the months.


--
Duane Hookom
MS Access MVP

Roger Bell said:
The Month Names are typed in a Table as January, February, March etc and
the
Field type is "Text".
Have tried the Expression as you suggested, but the result lists
everything
under "June"
I wrote the Expression as follows in the "Sorting and Grouping" section:

=Insrt(Left([Month Due], 3), "JanFebMarAprMayJunJulAugSepOctNovDec")

Where am I going wrong and thanks for your patience


:

Are you actually storing a month name or text in your table? If you want
to
store any part of a date, you should be storing a number. Forms and
reports
can always "display" a text value based on the number.

If you can't find a numeric value in your tables then you need to convert
your text to a number. It isn't clear if you stored the entire month name
or
just the first three characters. If you stored the entire month name, you
can set your sorting and grouping to an expression like:
=Instr(Left([Month Due], 3), "JanFebMar...Dec")

--
Duane Hookom
MS Access MVP

Thanks Duane. It is actually a seperate Table with the Months already
entered
as Text and a Combo Box on the Main Form. Is there any other way
around
this?
Much appreciated

:

You can only sort a report based on values in the report's record
source.
I
expect your Month Due was calculated from a real date field. Set your
sorting and grouping expression to:
=Format([Real Date Field], "yyyymm")

--
Duane Hookom
MS Access MVP

I have designed a Report with a Field called "Month Due" as the
Header.
When
I run the report the Months are sorted in Alpha order. I would like
the
Months to be listed from January to December.
Is there a way that this can be achieved?
Thanks in advance for any guidance
 

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