A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Sorting Months



 
 
Thread Tools Display Modes
  #1  
Old February 27th, 2009, 03:50 PM posted to microsoft.public.access.tablesdbdesign
Fred
external usenet poster
 
Posts: 1,451
Default Sorting Months

You didn't say what you data source is. Assuming it's a date/time field,

try sorting by format([NameofYourDateTimeField],"mm")

  #2  
Old February 27th, 2009, 03:56 PM posted to microsoft.public.access.tablesdbdesign
alfiajamel
external usenet poster
 
Posts: 5
Default Sorting Months

I completely forgot the source! There is a field in the table that has the
months listed that corresponds to the date in another field. If I insert the
date, then it gives me a daily report. I need the information on a monthly
basis.

"Fred" wrote:

You didn't say what you data source is. Assuming it's a date/time field,

try sorting by format([NameofYourDateTimeField],"mm")

  #3  
Old February 27th, 2009, 04:06 PM posted to microsoft.public.access.tablesdbdesign
Fred
external usenet poster
 
Posts: 1,451
Default Sorting Months

Assuming that that other field is a Date/Time field, I'd try what I gave you,
putting your date/time field name, (not your field with the month text)

BTW you probably shouldn't have that month field......just derive get the
month text from your date/time field when needed via an expression.



  #4  
Old February 27th, 2009, 04:21 PM posted to microsoft.public.access.tablesdbdesign
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Sorting Months

I have added numbers 1-12 in the mean time to get it to sort correctly,
however, it looks tacky.
You do not have to display what you sort by.
--
KARL DEWEY
Build a little - Test a little


"Fred" wrote:

Assuming that that other field is a Date/Time field, I'd try what I gave you,
putting your date/time field name, (not your field with the month text)

BTW you probably shouldn't have that month field......just derive get the
month text from your date/time field when needed via an expression.



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:01 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.