Control on Subform works sometimes

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form with a subform in "CONTINUOUS" view. I want the data in the
date control on the subform to be RED if the date is past, else it should be
black.

What is currently happening is that IF the first form in the "continuous"
subform has a past date, then the color of the dates on the other
"continuous" forms on the subform display properly. BUT IF the first
continuous form in the subform is null or contains a date in the future, the
continuous forms on the subform do not change color even though the date has
passed.

This is the code I'm using:

If Me!Exp.Value < Now() Then
Me!Exp.ForeColor = 255
Else
Me!Exp.ForeColor = 0
End If
 
Hi Donna,

don't use code, use Conditional Formatting

in the design view, click on the control and then choose
Conditional Formatting... from the Format menu


Warm Regards,
Crystal
Microsoft Access MVP 2006

*
Have an awesome day ;)

remote programming and training
strive4peace2006 at yahoo.com

*
 
Perfect! Thanks!

strive4peace" <"strive4peace2006 at yaho said:
Hi Donna,

don't use code, use Conditional Formatting

in the design view, click on the control and then choose
Conditional Formatting... from the Format menu


Warm Regards,
Crystal
Microsoft Access MVP 2006

*
Have an awesome day ;)

remote programming and training
strive4peace2006 at yahoo.com

*
 
you're welcome, Donna ;) happy to help

Warm Regards,
Crystal
Microsoft Access MVP 2006

*
Have an awesome day ;)

remote programming and training
strive4peace2006 at yahoo.com

*
 
Back
Top