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 / Reports / Printing / January 2006

Tip: Looking for answers? Try searching our database.

How can I change the background color on Access 2003 reports?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rynorem - 12 Jan 2006 16:18 GMT
My employee report is one employee w/info per page. How can I get the whole
page to be yellow if, let's say, the guy works for Billing Department. So
when I put his employee number in and it brings his record up it will be
yellow because he is in Billing. Can I make it so each department has a
different color? I can experiment but don't know where to go to begin. Thanks!
Duane Hookom - 12 Jan 2006 17:01 GMT
You can write code in the On Format event of a report section to set the
backcolor:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
   Select Case Me.txtDeptID
       Case 1
           Me.Detail.BackColor = vbYellow
       Case 4
           Me.Detail.BackColor = 12632256 'gray
       Case Else
           Me.Detail.BackColor = vbWhite
   End Select
End Sub

Ideally, you would store the color number in a table of your departments.
That way you could change the colors without touching your code.
Signature

Duane Hookom
MS Access MVP
--

> My employee report is one employee w/info per page. How can I get the
> whole
[quoted text clipped - 3 lines]
> different color? I can experiment but don't know where to go to begin.
> 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.