Results 1 to 4 of 4
  1. #1
    keiath is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    162

    Calculating 5 months

    Hi how do i do this:-

    I have a field that contains the year end date [S Charge Y/E Date] and another field that's the deadline date [Account deadline] and another field called the [Section 20B deadline]

    What i want it to do is this once i enter the [S Charge Y/E Date] i would like it to then calculate 5 months from that date into [Account deadline] I assume whatever the code is for this i can just repeat this to the [Section 20B deadline] but in stead of 5 months it would be 6 months.

    So that the results would be

    31/12/2013 Year end date

    31/5/2014 Account deadline date

    30/06/2014 Section 20B deadline date



    Totally not sure how to do this i have read some things but they seem to be able calculating the number of days between dates

    Thanks in advance

    Using Access 2010

    Keith

  2. #2
    Gina is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2014
    Posts
    10
    Hello Keith,

    In an unbound Text Field use formula =DateAdd("m", 5, S Charge Y/E Date)

    You would use the same forumula to calculate the Section 20B Deadline changing the 5 (for 5 mths) to 6.

    Gina

  3. #3
    keiath is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    162
    Quote Originally Posted by Gina View Post
    Hello Keith,

    In an unbound Text Field use formula =DateAdd("m", 5, S Charge Y/E Date)

    You would use the same forumula to calculate the Section 20B Deadline changing the 5 (for 5 mths) to 6.

    Gina
    Thanks i was trying to do this in a bound field had to change slightly as the code need [ ] =DateAdd("m", 5, [S Charge Y/E Date])

    Problem Solved

  4. #4
    Gina is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2014
    Posts
    10
    Great.

    I also found a formula that may work for you to force the advance date to be the end of month.

    =DateAdd ("m", 5, DateSerial (Year(Date()), Month (Date()), 1))-1

    I used today's date in the formula Date(). Also, when I ran the code it returned 5/31/2014, instead of 6/30/2014. So I adjusted the 5 to a 6 and it did return 6/30/2014. Adjust the 1 or -1 to get different dates.

    Best,
    Gina

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

Similar Threads

  1. Using same data for different months
    By EthanMoist in forum Access
    Replies: 1
    Last Post: 05-24-2013, 02:37 AM
  2. 12 months Budget
    By Qian in forum Access
    Replies: 1
    Last Post: 07-14-2012, 02:13 AM
  3. Replies: 1
    Last Post: 07-10-2012, 06:23 AM
  4. Criteria for last 12 months
    By libraccess in forum Queries
    Replies: 6
    Last Post: 05-07-2012, 07:33 PM
  5. How to show all months
    By Brian62 in forum Queries
    Replies: 4
    Last Post: 10-20-2009, 08:55 AM

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