A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Set Property



 
 
Thread Tools Display Modes
  #1  
Old April 8th, 2008, 07:19 AM posted to microsoft.public.access.forms
PR[_2_]
external usenet poster
 
Posts: 40
Default 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  
Old April 8th, 2008, 07:42 AM posted to microsoft.public.access.forms
boblarson
external usenet poster
 
Posts: 886
Default 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  
Old April 8th, 2008, 07:44 AM posted to microsoft.public.access.forms
boblarson
external usenet poster
 
Posts: 886
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:43 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.