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 / General 2 / July 2007

Tip: Looking for answers? Try searching our database.

Make every other line color

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
tjsmags - 24 Jul 2007 21:10 GMT
How do I make every other line on a FORM or REPORT a color so that it's
easier to read when you have a long list?  In Excel I do a CONDITIONAL FORMAT
that states:

=MOD(ROW(),2)+1<=1

Can I do this in Access?
Jeff Boyce - 24 Jul 2007 23:05 GMT
Access 2007 offers this feature.  To do it in earlier versions, you might
need to check to see if S. Lebans has something like that at his website...

Regards

Jeff Boyce
Microsoft Office/Access MVP

> How do I make every other line on a FORM or REPORT a color so that it's
> easier to read when you have a long list?  In Excel I do a CONDITIONAL
[quoted text clipped - 4 lines]
>
> Can I do this in Access?
tjsmags - 25 Jul 2007 15:38 GMT
What is his website?

> Access 2007 offers this feature.  To do it in earlier versions, you might
> need to check to see if S. Lebans has something like that at his website...
[quoted text clipped - 12 lines]
> >
> > Can I do this in Access?
Douglas J. Steele - 25 Jul 2007 16:24 GMT
http://www.lebans.com

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

> What is his website?
>
[quoted text clipped - 15 lines]
>> >
>> > Can I do this in Access?
Michael Gramelspacher - 25 Jul 2007 01:20 GMT
> How do I make every other line on a FORM or REPORT a color so that it's
> easier to read when you have a long list?  In Excel I do a CONDITIONAL FORMAT
[quoted text clipped - 3 lines]
>
> Can I do this in Access?

see: http://support.microsoft.com/default.aspx?scid=kb;EN-US;288154

It is also demonstrated in the Access 2000 Reports sample database.
Gina Whipp - 25 Jul 2007 02:21 GMT
In a report I use...

Option Compare Database
Option Explicit
Dim bluebar As Boolean

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
   If bluebar Then
       Detail.BackColor = 16777215
   Else
       Detail.BackColor = 15986411
   End If
bluebar = Not (bluebar)
End Sub

Never bothered in a form...
Signature

Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

>> How do I make every other line on a FORM or REPORT a color so that it's
>> easier to read when you have a long list?  In Excel I do a CONDITIONAL
[quoted text clipped - 8 lines]
>
> It is also demonstrated in the Access 2000 Reports sample database.
tjsmags - 29 Jul 2007 19:48 GMT
I am a little new to this.  I have my report open with the REPORT properties
showing.  Where do I find Option Compare Database?  I'm sorry I need explicit
directions.  Thanks.

> In a report I use...
>
[quoted text clipped - 24 lines]
> >
> > It is also demonstrated in the Access 2000 Reports sample database.
Michael Gramelspacher - 29 Jul 2007 19:57 GMT
> I am a little new to this.  I have my report open with the REPORT properties
> showing.  Where do I find Option Compare Database?  I'm sorry I need explicit
[quoted text clipped - 28 lines]
> > >
> > > It is also demonstrated in the Access 2000 Reports sample database.

'This is the On Format event of my reports Detail section.

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
     
On Error Resume Next

Const cYellow As Long = 15198183
Const cwhite As Long = 16777215
Const cPurple As Long = 16751052

Dim ctl As Control
Dim sec As Section
   Set sec = Me.Section("Detail")

   If sec.BackColor = cwhite Then
       sec.BackColor = cYellow
   Else
       sec.BackColor = cwhite
   End If

   For Each ctl In sec.Controls
       If ctl.BackColor = cYellow Then
           ctl.BackColor = cwhite
       Else
           ctl.BackColor = cYellow
       End If
   Next

End Sub
tjsmags - 29 Jul 2007 20:10 GMT
Are you telling me to look at an article?  If so, I cannot find the link...

> > I am a little new to this.  I have my report open with the REPORT properties
> > showing.  Where do I find Option Compare Database?  I'm sorry I need explicit
[quoted text clipped - 58 lines]
>
> End Sub
Gina Whipp - 29 Jul 2007 20:57 GMT
Open your report in design mode by highlighting your report (while closed)
in the design window and presing the 'Code' button on the toolbar.  Then
copy and paste the entire section I typed, makre you don't get any foreign
characters.  Save and close

Signature

Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

>I am a little new to this.  I have my report open with the REPORT
>properties
[quoted text clipped - 31 lines]
>> >
>> > It is also demonstrated in the Access 2000 Reports sample database.
tjsmags - 29 Jul 2007 22:46 GMT
Great.  It works.  Is there a way to adjust the HEIGHT of the shaded area?

> Open your report in design mode by highlighting your report (while closed)
> in the design window and presing the 'Code' button on the toolbar.  Then
[quoted text clipped - 36 lines]
> >> >
> >> > It is also demonstrated in the Access 2000 Reports sample database.
Gina Whipp - 29 Jul 2007 23:31 GMT
The height of the shaded area is based on the height of the detail section.
If you want it to shrink and grow according to how much text is there.
Report in design view, click on the Details section....  In the Properties
section of the Detail section set the Can Grow = Yes and Can Shrink = Yes

Signature

Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

> Great.  It works.  Is there a way to adjust the HEIGHT of the shaded area?
>
[quoted text clipped - 41 lines]
>> >> >
>> >> > It is also demonstrated in the Access 2000 Reports sample database.
 
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.