Try:
Me.DaysExpired = DateDiff("d", Now, SecondDate)
HTH,
Rob
> Can anyone please help me to check the code below?
> I execute in VBA and a error message display object required...
[quoted text clipped - 3 lines]
> SecondDate = CDate(Me.cboDateExpired)
> Me.DaysExpired = DateDiff(DateInterval.Day, Now, SecondDate)
I can get the result already..
Can I ask how to change the text box to red color if my days expired is
positive ?
Dim SecondDate As Date
SecondDate = CDate(Me!cboDateExpired)
Me!DaysExpired = DateDiff("d", SecondDate, Now)
>Can anyone please help me to check the code below?
>I execute in VBA and a error message display object required...
[quoted text clipped - 3 lines]
>SecondDate = CDate(Me.cboDateExpired)
>Me.DaysExpired = DateDiff(DateInterval.Day, Now, SecondDate)
Rob Parker - 16 May 2007 04:10 GMT
Use conditional formatting; you'll find it on the Format menu. Just fill in
the appropriate entries in the dialog box, and chose the text colour you
want.
HTH,
Rob
>I can get the result already..
> Can I ask how to change the text box to red color if my days expired is
[quoted text clipped - 11 lines]
>>SecondDate = CDate(Me.cboDateExpired)
>>Me.DaysExpired = DateDiff(DateInterval.Day, Now, SecondDate)