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 Programming / July 2007

Tip: Looking for answers? Try searching our database.

Changing Field Color

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Paul - 16 Jun 2007 00:23 GMT
This group has been amazing, so I hope I am not going to the well too often.  
But here it goes.

When I click a button, I want another field to change color.  There are a
lot of field on the page and the button loads a file add dialog box and I
want it to be clear what box you are adding the file to.  When the dialog
clears, I want the box to return to its base color

Thanks
Bill - 16 Jun 2007 05:21 GMT
Assuming you're referring to the color of text in a label or textbox, though
the process is the same for any control that provides for "Fore Color"
option,
one changes the color by setting the "Fore Color" property of the control of
interest.

Example: Me.MyControl.ForeColor = 0 would change the text color to black.

or

Me.MyControl.ForeColor = 16711680 would change the text color to Blue.

Such code could be placed in the OnClick event of a command button.

Bill

> This group has been amazing, so I hope I am not going to the well too
> often.
[quoted text clipped - 6 lines]
>
> Thanks
rtviper - 31 Jul 2007 22:34 GMT
In the On_Click event of your button put Me. fieldname.backcolor=vbyellow.
in the After update event of that Field put Me.fieldname.backcolor=vbwhite.
This will toggle the field color back and forth between yellow and white.

> Assuming you're referring to the color of text in a label or textbox, though
> the process is the same for any control that provides for "Fore Color"
[quoted text clipped - 22 lines]
> >
> > Thanks
 
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



©2008 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.