I am making some progress. This works:
Item.UserProperties.Find("Age").Value = "Hello"
But this generates a "Type Mismatch" error message:
Item.UserProperties.Find("Age").Value =
IIf([Birthday]<>"None",DateDiff("yyyy",[Birthday],Date())-IIf(DateDiff("d",CDate(Month([Birthday])
& "/" & Day([Birthday]) & "/" & Year(Date())),Date())<0,1,0),"")
Still plugging away...
Thanks!
Fred
> Hi:
>
[quoted text clipped - 12 lines]
> Thanks!
> Fred
-----------------------------------------------------------------------------
Less Spam Better enjoyable experience
Visit : news://spacesst.com
Fred Boer - 30 Jun 2009 13:01 GMT
Hello:
I've learned that the problem is with IIF in VBScript (I thnink!).
Found this code (thanks Sue Mosher):
Public Function IIf(blnExpression, vTrueResult, vFalseResult)
If blnExpression Then
IIf = vTrueResult
Else
IIf = vFalseResult
End If
End Function
and now this expression appears to work:
Item.UserProperties.Find("Age").Value =
IIf([Birthday]<>"None",DateDiff("yyyy",[Birthday],Date())-IIf(DateDiff("d",CDate(Month([Birthday])
& "/" & Day([Birthday]) & "/" & Year(Date())),Date())<0,1,0),"")
Thanks,
Fred
>I am making some progress. This works:
> Item.UserProperties.Find("Age").Value = "Hello"
[quoted text clipped - 27 lines]
>> Thanks!
>> Fred