Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / April 2008

Tip: Looking for answers? Try searching our database.

Set Property

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
PR - 08 Apr 2008 07:19 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.