Date Calculations Based on User Input

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MadSma
    New Member
    • Sep 2010
    • 13

    #1

    Date Calculations Based on User Input

    hi as i am a newbie to access i need some help for some basic functionality

    i need to be able to calculate a date after 6 or 12 months based on a staring date the user inputs on my form as well as an intervaldate of the users choices

    ok what do i have
    in a form called duration i have

    1. a list box [Duration]that holds 2 values(6months and 12 months)
    2. a dateField called [starting_date]
    3. a date field called [ending_date]
    4 a number filed[Interval]
    5.a datefield field[Interval_date]

    the form should work as a date calculator
    the user will input 3 things
    a.startting date
    b. choose between 6 and 12 months and
    c. an intermidiate months X (i.e 3 or 5 or 9)

    and the form should calculate the ending_date field which should be either 6 or 12 months after the staring date

    and the interval_date field which should be the x months after the staring date


    anyone knows how to do this???
  • dsatino
    Contributor
    • May 2010
    • 393

    #2
    There is a function called DateAdd. Use that as the controlsource for the fields that calculate.

    This and other functions can be found here:
    For easy reference, we have provided a list of all Microsoft Access functions sorted into categories such as string, numeric/mathematical, date/time, advanced/logical, domain aggregate, data type conversion, group by, and file/directory functions.

    Comment

    Working...