Scriptproblem

Hi I use this but it´s not work.

If a remove Status i works fine.

Anyone who see what i did wrong.

If(datetime1.localtime>=datetime2.LocalTime And doc.Mailed(0)="0" And (doc.Status(0)<>"Closed" Or doc.Status(0)<>"Pending" )) Then

Kind regards

Fredrik

Subject: Scriptproblem…

Maybe this works:

If(datetime1.localtime>=datetime2.LocalTime And doc.Mailed(0)=“0” And (not doc.Status(0)=“Closed” Or not doc.Status(0)=“Pending” )) Then

Timo

Subject: Close, but try this instead…

If (datetime1.localtime>=datetime2.LocalTime And doc.Mailed(0)=“0” And Not (doc.Status(0) = “Closed” Or doc.Status(0) = “Pending”)) Then

Subject: Also…

Don’t forget that LocalTime returns a STRING.

You should probably change it to:

If(datetime1.LSLocalTime>=datetime2.LSLocalTime AND doc.Mailed(0)=“0” And Not(doc.Status(0) = “Closed” Or doc.Status(0) = “Pending”)) Then

Otherwise,

07/15/2005 03:20 PM

Will actually be GREATER than

06/15/2010 03:20 PM

LSLocalTime will return a Variant of type DATE.