Results 1 to 4 of 4
  1. #1
    Brian62 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2009
    Posts
    147

    Need to show Oct - Dec as 1st Qtr

    In my query I need to show Oct - Dec as "1 Qtr - 2010" Jan - Mar as "2 Qtr - 2011" etc



    The code I am using now gives me 2010 as the fourth quarter.

    Here is the code I am using: Qtr: Format$([Dateofaudit],"q"" Qtr - ""yyyy",0,0)

    The return is: "1 Qtr - 2011" etc.

    I tried adding -1 at the end of the code and in the code but won't work.

  2. #2
    sabre is offline Novice
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    4
    First of all it seems a little bit odd and illogical that after 1st quarter 2010 there follows a 2nd quarter of 2011. It seems to be possible with the usage of an IIf function though.
    I'd add 3 months to the [Dateofaudit] and then format it as quarter.
    If you still need to change the year you can add an IIf function which will substract one year from the date if it is the first quarter, and format it afterwards.

  3. #3
    Brian62 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2009
    Posts
    147
    The reason why I need it to show Oct - Dec is the Government starts their fiscal year is October 1.
    The code I altered is: Qtr: Format(DateAdd("m",3,[Dateofaudit]),"q"" Qtr - ""yyyy",0,0)

    With this code I show 12/1/2010 as "1 Qtr - 2011". I need it to show "1 Qtr - 2010". Of course the rest of the qtrs need to show 2011 since they are part of that year.

    I hope this helps!

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,847
    See if this helps re Fiscal Year
    http://support.microsoft.com/kb/210249

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Show all records.
    By dennisvillareal in forum Access
    Replies: 1
    Last Post: 03-03-2011, 04:28 PM
  2. Code to show PW as ******
    By Desstro in forum Access
    Replies: 7
    Last Post: 11-03-2010, 09:37 AM
  3. Query, show top 10
    By lostinspace in forum Queries
    Replies: 4
    Last Post: 05-10-2010, 12:18 PM
  4. How to show all months
    By Brian62 in forum Queries
    Replies: 4
    Last Post: 10-20-2009, 08:55 AM
  5. Show some or all
    By protean_being in forum Queries
    Replies: 1
    Last Post: 05-28-2008, 05:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums