Change Record

K

Kevin

I want to change the colour of a field depending on the
value of the field when displaying records, but where
should I put this code? How do I know a user has click on
the navigator?

Thanks

Kevin
 
F

Fredg

Kevin,
If you are using Access 2000 or 2002, you can
set the control's Conditional Formatting property.
Format + Conditional Formatting.

If you are using Access 97 in single form view,
you can code the Form's Current event:
If [SomeControl] >= SomeValue Then
[SomeControl].BackColor = vbYellow
[SomeControl.ForeColor = vbBlue
Else
[SomeControl].BackColor = vbWhite
[SomeControl].ForeColor = vbBlack
End If

If the control is updateable, place the same code also in that control's
AfterUpdate event.
 

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