moleygunn
Apr 1 2005, 11:01 AM
Hello,
I was wondering if I can change the colour of a textbox to red if a field has a certain value?
I've got a task list, and I want certain tasks to appear in red if the 'importance' fields says High.
Thanks,
Scott
freakazeud
Apr 1 2005, 11:06 AM
Hi,
Try this:
If Me.YourFirstControl.Value = "yourvalue" Then
Me.YourOthercontrol.BackColor = 255
Else
Me.YourOthercontrol.BackColor = white
End If
HTH
Good luck.
moleygunn
Apr 1 2005, 11:10 AM
Silly question, but where should I put that code?
Scott
freakazeud
Apr 1 2005, 11:16 AM
Well depends when you want the change of color to happen.
If your importance field has a value already when the form opens that you can put it on the form open event.
If you want it if someone types high in the importance field then on the after update event of the importance field.
NoahP
Apr 1 2005, 11:42 AM
Check out 'Conditional Formatting' in Access Help. No code required with that.
HTH
Noah
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.