Results 1 to 2 of 2
  1. #1
    bopsgtir is offline Advanced Beginner
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Dec 2010

    add date based on another date field in a table

    Probably quite a simple one.

    i have a table which has columns MOT, MOT_DUE_DATE.

    also i want is the MOT_DUE_DATE to be automatically set to a year later than the MOT field.

    So question is can i do that from a table or would i have to crete query to do it.

  2. #2
    jzwp11 is offline VIP
    Windows 7 Access 2007
    Join Date
    Jun 2010
    Dayton, OH
    In most cases, calculated values should not be stored in the table. You would however store the values that are used for the calculation. If the frequency (1 year) is the same for all records, then you probably do not even need to store that. If the frequency can be different, then I would store it.

    To display the value 1 year after the MOT, then you would just calculate the date whenever you need it in forms, queries and reports.

    I would recommend using the date add function. The following would add 1 year to the value in the MOT field

    dateadd("yyyy",1, MOT)

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

Similar Threads

  1. Field content based on date calculation
    By jlmnjem in forum Programming
    Replies: 6
    Last Post: 09-23-2010, 10:24 AM
  2. lost - linking date field based on a record with smaller Unique ID
    By in forum Queries
    Replies: 7
    Last Post: 09-16-2010, 02:22 PM
  3. Set date field on subform to date variable
    By laavista in forum Access
    Replies: 4
    Last Post: 06-30-2010, 06:32 PM
  4. set date field on form to date variable
    By laavista in forum Access
    Replies: 3
    Last Post: 06-28-2010, 03:03 AM
  5. Replies: 0
    Last Post: 07-27-2009, 07:51 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