Control on Subform works sometimes

D

Donna

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
 
S

strive4peace

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

*
 
D

Donna

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

*
 
S

strive4peace

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

*
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top