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 2005

Tip: Looking for answers? Try searching our database.

Changing a Control's BackColor w/Code

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JamesJ - 16 Jul 2005 00:14 GMT
Hi. I have several forms with a listbox and would like
to change the BackColor from a procedure that I
can call from each form's Load event(or what ever
event is relevant.
Any help will be appreciated.

James
Marshall Barton - 16 Jul 2005 05:41 GMT
>Hi. I have several forms with a listbox and would like
>to change the BackColor from a procedure that I
>can call from each form's Load event(or what ever
>event is relevant.

I suppose you want a procedure to do that?

Public Sub SetBackColor(ctl As Control)
    ctl.BackColor = RGB(255, 192, 192)   ' pink
End Sub

Then the Load event can call the procedure:

    SetBackColor(Me.listboxname)

Signature

Marsh
MVP [MS Access]

JamesJ - 16 Jul 2005 10:45 GMT
Works fine. Thanks.

James

>>Hi. I have several forms with a listbox and would like
>>to change the BackColor from a procedure that I
[quoted text clipped - 10 lines]
>
> SetBackColor(Me.listboxname)
 
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.