auto fill two fields base off a date

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • paaap
    New Member
    • Feb 2014
    • 1

    #1

    auto fill two fields base off a date

    What I have is three fields ... EPIC Date, Shipping Date, Email Date
    What I want to do is from the date in "EPIC Date" have it auto fill the other two fields. the shipping date should be 14 days before the "EPIC Date" and the Email Date should be 3 days
  • mcupito
    Contributor
    • Aug 2013
    • 294

    #2
    Look into the
    Code:
    DateAdd()
    function.

    Get help with your questions about Microsoft Access with our how-to articles, training videos, and support content.


    So on the AfterUpdate event on the EPIC Date "field", use the DateAdd() function to add dates into your other two fields based on what you already know.

    Comment

    • zmbd
      Recognized Expert Moderator Expert
      • Mar 2012
      • 5501

      #3
      Any reason why you are storing the calculated data?
      Normally one would do this in the query with a calculated field, only storing something like the actual shippment date for record keeping.

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32669

        #4
        MCupito points you in the right direction for the how, but, like zmbd, I'd advise that you don't store calculated data in a database. Calculate it when needed instead.

        For more on this see Database Normalisation and Table Structures.

        Comment

        Working...