Sort by Month

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I created a query to display data for two colum headings titled "Month" and
"Deposits". When I view the query, I note that the data is not displayed
chronologically but as follows:

MONTH DEPOSITS
February $2,500
January $1,200

I would like to have the data display in chronological order. How do I make
this happen in Design View under Query? I am just starting to learn Access.
So it would be greatly appreciated if precise instructions could be provided.

Many thanks in advance for your kind assistance.
 
More details needed. Are you getting Month from some date field? or is
this a text field that you are entering the letters of the month into?
 
Dear Mikki:

If you sort by the names of months, they will certainly come out in
alphabetical order.

Tom Ellison
 
John,

Many thanks for your response. I used the Wizard to create my query and in
doing so, I chose to use the headings and data from a Table I created called
"Transactions". I used the Medium Date format in my "Transactions" table.

In Design View, the following details are shown:

FIELD: Month: Format$(Transactions.Date,'mmmm')
TABLE:
SORT:

[NOTE: Under TABLE AND SORT, no details are shown.]

I hope my response provides a bit more clarity for you. Thanks, John.
 
Add another field to the query.

Field: MonthNumber: Month(Transactions.Date)
Sort: Ascending


Because you have used the word MONTH as a field name, this may fail. Try
changing what you have to:
FIELD: TransMonth: Format$(Transactions.Date,'mmmm')
TABLE:
SORT:


Mikki said:
John,

Many thanks for your response. I used the Wizard to create my query and
in
doing so, I chose to use the headings and data from a Table I created
called
"Transactions". I used the Medium Date format in my "Transactions" table.

In Design View, the following details are shown:

FIELD: Month: Format$(Transactions.Date,'mmmm')
TABLE:
SORT:

[NOTE: Under TABLE AND SORT, no details are shown.]

I hope my response provides a bit more clarity for you. Thanks, John.

John Spencer said:
More details needed. Are you getting Month from some date field? or is
this a text field that you are entering the letters of the month into?
 
John,

I added another column and the months are now shown chronologically. I did
not need to change "Month" to "TransMonth" as per your suggestion. Since I
did not get any error messages, I decided to leave it as "Month" for now.

Many thanks for your prompt and helpful assistance.

John Spencer said:
Add another field to the query.

Field: MonthNumber: Month(Transactions.Date)
Sort: Ascending


Because you have used the word MONTH as a field name, this may fail. Try
changing what you have to:
FIELD: TransMonth: Format$(Transactions.Date,'mmmm')
TABLE:
SORT:


Mikki said:
John,

Many thanks for your response. I used the Wizard to create my query and
in
doing so, I chose to use the headings and data from a Table I created
called
"Transactions". I used the Medium Date format in my "Transactions" table.

In Design View, the following details are shown:

FIELD: Month: Format$(Transactions.Date,'mmmm')
TABLE:
SORT:

[NOTE: Under TABLE AND SORT, no details are shown.]

I hope my response provides a bit more clarity for you. Thanks, John.

John Spencer said:
More details needed. Are you getting Month from some date field? or is
this a text field that you are entering the letters of the month into?

I created a query to display data for two colum headings titled "Month"
and
"Deposits". When I view the query, I note that the data is not
displayed
chronologically but as follows:

MONTH DEPOSITS
February $2,500
January $1,200

I would like to have the data display in chronological order. How do I
make
this happen in Design View under Query? I am just starting to learn
Access.
So it would be greatly appreciated if precise instructions could be
provided.

Many thanks in advance for your kind assistance.
 
Hi all,
I have a table called date, which is having only one column as months which will contain only months name like january,february,march etc..
when i query the table i.e. select * from date, then this table should give me result as months in chronological order only.
How can i do that? i cant add any other column to this table.:confused:
Kindly help.
I am using SQL Server management studio for the creation of table....
 
Back
Top