Date help

  • Thread starter Thread starter EMILYTAN via AccessMonster.com
  • Start date Start date
E

EMILYTAN via AccessMonster.com

Can anyone please help me to check the code below?
I execute in VBA and a error message display object required...

Dim SecondDate As Date

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)
 
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
 
Back
Top