I am trying to compare if the custNo and ItemNo in one table match the CustNo and ItemNo in another then I want to set the warrEnd1 to 12/31/1999 being out of warranty
if isnull({vSerialNo.WarrEnd1}) or {vSerialNo.WarrEnd1} = date(0,0,0) or {vSerialNo.WarrEnd1} =DateTimeValue ("12/31/9999") or ({CustomerModels.CustNo} <> {vSerialNo.CustNo} and {vSerialNo.ItemNo} <>{CustomerModels.ItemNo}) then
DateTimeValue ("12/31/1999")
else
({vSerialNo.WarrEnd1})
if isnull({vSerialNo.WarrEnd1}) or {vSerialNo.WarrEnd1} = date(0,0,0) or {vSerialNo.WarrEnd1} =DateTimeValue ("12/31/9999") or ({CustomerModels.CustNo} <> {vSerialNo.CustNo} and {vSerialNo.ItemNo} <>{CustomerModels.ItemNo}) then
DateTimeValue ("12/31/1999")
else
({vSerialNo.WarrEnd1})