If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Set Property
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 |
#2
|
|||
|
|||
Set Property
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 __________________________________ "PR" wrote: 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 |
#3
|
|||
|
|||
Set Property
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 __________________________________ "PR" wrote: 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 |
Thread Tools | |
Display Modes | |
|
|