Sorting a Text Field MONTH by month not alphabetically

K

kdagostino

When I designed the database, I did not want to type in the date because only
the month was relevant. So, I have a text field that is MONTH, and I type in
the full name of the month (e.g. September).

When I open a report, it sorts it by month, but it does it alphabetically
not chronologically. Is there any way I can make the report recognize the
MONTH field as a month and not text? If not is there a way I can create a
custom sort order for the report?

Thanks
 
R

Rick Brandt

kdagostino said:
When I designed the database, I did not want to type in the date
because only the month was relevant. So, I have a text field that is
MONTH, and I type in the full name of the month (e.g. September).

When I open a report, it sorts it by month, but it does it
alphabetically not chronologically. Is there any way I can make the
report recognize the MONTH field as a month and not text? If not is
there a way I can create a custom sort order for the report?

Thanks

In the sorting and grouping box sort on the expression...

=CDate([MONTH] & " 1, 2005")

BTW, it's a bad idea to name a field or control "Month" as that is a
reserved word in Access (there is a VBA function named Month). As long as
you keep the square brackets around it it "should" work, but it would be
better to rename it.
 
J

Joel

You could always make another table called Months and add these fields:
"Month" and "MonthID"

Type in all the months and then set the ID of each month in cronological order
EX: January = 1, November = 11

then in your form just use a Combo box and set the control source to that
table.

Change your "Month" field in the table your saving to, to store the
"MonthID" instead of text.

This way you dont have to type in the month every time ( saves on human
error also) and you can easly sort them.

HTH.

Joel.
 

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