Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2002

    Red face Unanswered: question/problem using DateAdd function

    Hello everyone,
    I am attempting to use the a SQL expression using DateAdd to calculate a future date based on pastdate and X number of months.

    The following expressions work great in a form and query (respectfully)


    dtmDateCalibrationDue: DateAdd("m",+[tblMasterEquipment]![numCalibrationIntv],[tblMasterEquipment]![dtmDateCalibrated])

    Problem is I would like this value stored in tblMasterEquipment

    Is there some unwritten law that says I cannot use this expression as the default value in a table field? (It doesnt seem to work). I am very open to suggestions. thanks in adavance!!!


  2. #2
    Join Date
    Feb 2002
    I have tried this previously and can only vaguely remember something about formatting the dateadd function.

    I seem to think to make it work in SQL I had to format the date, something like:

    StrA=Format(DateAddetc,"Medium Date")

    This then forced access to correctly interpret the date in the SQL statement.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts