Results 1 to 5 of 5
  1. #1
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383

    Date for frist quarter of the year, year starts January 1


    If I make my fiscal year starting with January 1 then what would be the date code for a textbox to display that? i tried Date()+90 but that gives me the wrong date! I want to display the quarters of the year, 1, 2 , 3 and 4 in my textboxes. As I said, I will make January 1 as the beginning of the fiscal year. Would there be a way to allow the user to enter a date and then set the fiscal year off of that if they want to change it? Many thanks in advance.
    Text49, Text52, Text54, and Text56. I also have a textbox to display just the quarter by number that we are in. Here is the code for that.
    =Format([EventStart],"q") EventStart is just a date field.

  2. #2
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    Consider using the DateAdd function

    http://www.techonthenet.com/access/f...te/dateadd.php

  3. #3
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Instead of using Date()+90, use the DateAdd function where you can specify exactly the number of months to add, i.e.
    Quarter2: DateAdd ("m",3, [MyDateField])
    Quarter3: DateAdd ("m",6, [MyDateField])
    Quarter4: DateAdd ("m",9, [MyDateField])


    EDIT: Whoops, slow typing. Didn't see Alan's reply until afer I posted.

  4. #4
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Thanks so much.

  5. #5
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Where jan =DateSerial(Year(Date()),1,1) Beginning of current year. January 1. IS THIS CORRECT ?

    Quarter1: DateAdd ("m",1, [jan])
    Quarter2: DateAdd ("m",3, [jan])
    Quarter3: DateAdd ("m",6, [jan])
    Quarter4: DateAdd ("m",9, [jan])
    __________________________________________________ ______________________________________
    jan =DateSerial(Year(Date()),1,1) Text49 = DateAdd("m",1,[jan])+60

    DateAdd("m",1,[jan])+60 First Quarter of Year
    DateAdd("m",3,[Text49]) Second Quarter of Year
    DateAdd("m",6,[Text49]) Third Quarter of Year
    =[Text54]+90 Fourth Quarter of Year


    Text54 is the 3rd Quarter and equals DateAdd("m",6,[Text49])
    Last edited by burrina; 01-09-2013 at 11:27 AM. Reason: All of y code.

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

Similar Threads

  1. Financial Year not Calendar Year
    By Kirsti in forum Queries
    Replies: 5
    Last Post: 05-02-2012, 09:11 PM
  2. Replies: 4
    Last Post: 01-10-2012, 06:26 PM
  3. Year over Year Comparision of Portfolio
    By richard70 in forum Queries
    Replies: 2
    Last Post: 10-31-2011, 08:19 PM
  4. Show Year with Quarter
    By Mordred in forum Access
    Replies: 9
    Last Post: 06-30-2011, 07:50 AM
  5. Replies: 23
    Last Post: 06-30-2010, 02:05 PM

Tags for this Thread

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