I would like know how I can, using code change the background colour of a
form, when a control on that from has a value set...
e.g., I have a main from with an option control on it, when this control is
set to inactive, I would like the main form background colour to be set.
Can anyone help me.
Regards - Paul
boblarson - 08 Apr 2008 07:42 GMT
Yes, you can do it. In the option control's After Update event, put this:
Me.Detail.BackColor = WhateverNumberOfTheColorYouWant

Signature
Bob Larson
Access World Forums Super Moderator
Utter Access VIP
Tutorials at http://www.btabdevelopment.com
__________________________________
> I would like know how I can, using code change the background colour of a
> form, when a control on that from has a value set...
[quoted text clipped - 5 lines]
>
> Regards - Paul
boblarson - 08 Apr 2008 07:44 GMT
Oops, forgot one piece:
If Me.YourOptionGroupName = 2 Then ' (assuming 2 is the value for INACTIVE)
Me.Detail.BackColor = WhateverColorNumberYouWantHere
Else
Me.DetailBackColor = WhateverColorNumberYouWantWhenNOTInactiveHere
End If

Signature
Bob Larson
Access World Forums Super Moderator
Utter Access VIP
Tutorials at http://www.btabdevelopment.com
__________________________________
> I would like know how I can, using code change the background colour of a
> form, when a control on that from has a value set...
[quoted text clipped - 5 lines]
>
> Regards - Paul