Variable Font or Background Color

L

Lloyd

Can someone share with me code (Access97) that will, when
a form is opened, display the font color or background
color of a date field in a form in a different color when
the date has past today's date.

Thanks, Lloyd
 
F

fredg

Can someone share with me code (Access97) that will, when
a form is opened, display the font color or background
color of a date field in a form in a different color when
the date has past today's date.

Thanks, Lloyd

In Access 97, using Single Form View only, you can code the form's
Current event:
If Me![DateField] < Date then
Me![DateField].ForeColor = vbYellow
Me![DateField].BackColor = vbRed
Else
Me![DateField].ForeColor = vbBlack
Me![DateField].BackColor = vbWhite
End If
 

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