BackColor is not a property of the form object. The basic color of forms is set by your system colors. However, you can place a box control on your form such that it covers the entire form, set its back style to normal, set its border to transparent, and its style to flat. Then in your form's OnCurrent event:
Code:
If Me.MyCheck Then
Me.Box10.BackColor = vbRed [green]'or whatever color you wish[/green]
Else
Me.Box10.BackColor = vbYellow [green]'or whatever color you wish[/green]
End If
You'll probably want to put the same code in the checkbox's AfterUpdate event so the color will change when the checkbox is checked/unchecked. And you may wish to set a default value for your checkbox, otherwise an error will be raised when you move to a new empty record.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.