Set Property

  • Thread starter Thread starter PR
  • Start date Start date
P

PR

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
 
Yes, you can do it. In the option control's After Update event, put this:

Me.Detail.BackColor = WhateverNumberOfTheColorYouWant


--
Bob Larson
Access World Forums Super Moderator
Utter Access VIP
Tutorials at http://www.btabdevelopment.com

__________________________________
 
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
--
Bob Larson
Access World Forums Super Moderator
Utter Access VIP
Tutorials at http://www.btabdevelopment.com

__________________________________
 
Back
Top