Error Assigning Null to a Date Field in a Subform

Error Assigning Null to a Date Field in a Subform

Hi,

I have a working script.  It works great!  The problem is now I want to edit it and I cannot.  I can't even save the script without making any changes.  I receive the following error message:

Expecting TIMESTAMP expression found NULLTYPE expression

Below is the code the generates the error:




  1. //Alert if the Move Out Date is not after the Move In Date
    if (row.Move_Out_Date  <  row.Move_In_Date)
    {
        alert("The Move Out Date cannot be before the Move In Date.");
        row.Move_In_Date = null;
    }





I cannot assign null to a date within a subform.  I've tried this in several other applications and I get the same error.  The error does not appear when applying null to a date in a normal form.  It only occurs within a subform.  Can someone please address this problem?

Thanks!
Mike