Access error with calculated field

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • noclueforid
    New Member
    • May 2010
    • 24

    Access error with calculated field

    Here is my calculation:

    =DateAdd("d",-1,DateAdd("d",5 6,DateAdd("d",-(IIf(Weekday([Cert_Date])=1,"0",Weekday ([Cert_Date]-1))),[Cert_Date])))

    I get "#Error" in the field when displayed. However, when I enter the [Cert_Date] for the calculation, it does calculate. So why is the error showing?

    Thanks!
  • Steven Kogan
    Recognized Expert New Member
    • Jul 2010
    • 107

    #2
    It seems Cert_Date can't be null for the formula to work.

    Try:
    Code:
    iif(isdate([Cert_Date]),DateAdd("d",-1,DateAdd("d",56,DateAdd("d",-(IIf(Weekday([Cert_Date])=1,"0",Weekday([Cert_Date]-1))),[Cert_Date]))),Null)

    Comment

    • noclueforid
      New Member
      • May 2010
      • 24

      #3
      THANKS!!!!!!!!! !!!

      Dave

      Comment

      Working...