Changing Rectangle (Box) Colour

adenwalker

Registered User.
Local time
Today, 22:44
Joined
Jan 18, 2005
Messages
39
I would like a box to turn orange when a field in a record is entered to "yes", and when is "no" turns back to transparent. A bit like a warning light on a till!

Can anybody help me as i am totally stuck?
Thanks
 
If [field] = "yes" then
box.BorderStyle = 1 'Solid
box.BorderColor = 33023 'code for Orange
Else
box.BorderStyle = 0 'Transparent
End If


Put the above code in the On Current action of the form.
 
it doesn't work!
 
You may need to repaint and/or refresh

Me.repaint
me.refresh

You may even need to add:

DoEvents

Try it...
 
I have now done it.

I have added a second "light" as Error which colours red if selected. Is it possible to make this flash between the colour red and transparent.
 
You would have to use the On Timer event.... to switch it around...

Regards
 
How?
I'm already using the OnTimer event to refresh the page.
 
if box.color = orange then
box.color = blank
else
box.color = orange
endif
me.repaint 'Or something...

something like that...
 

Users who are viewing this thread

Back
Top Bottom