Shade alternate lines in a report...without code!

Discussion in 'Microsoft Access Reports' started by Joe, May 3, 2004.

  1. Joe

    Joe Guest

    Hello,

    Looking for a way to print reports with every other line
    shaded...but without code. I have had reports (phone
    lists, etc.) print this way a loooong time ago, but cannot
    figure out how I got it to happen.

    Thanks and make it a GREAT DAY!

    Joe
     
    Joe, May 3, 2004
    #1
    1. Advertisements

  2. Joe wrote:
    >Looking for a way to print reports with every other line
    >shaded...but without code. I have had reports (phone
    >lists, etc.) print this way a loooong time ago, but cannot
    >figure out how I got it to happen.



    It's simpler using code.

    Without code, if you're using A2K or later, First, add a
    text box named txtLineCtr, make it invisible and set its
    expression to =1.

    Make the BackStyle of all of your current controls
    Transparent.

    Then add another text box (the same size as the entire
    detail section) and use The Format - Send To Back menu item
    to put it behind all the other controls. Now you can set
    tis text box's Conditional Formatting - Expression Is
    txtLineCtr Mod 2 = 0
    with your selected background color.

    --
    Marsh
    MVP [MS Access]
     
    Marshall Barton, May 3, 2004
    #2
  3. Joe

    Joe Guest

    Thanks Marsh!

    Quick follow up. When you say make the first text
    invisible, I assume you mean under the format menu,
    visible, and click "no." But I am not sure where to put
    the "expression" of "=1." Is that under tab Data, then
    Control Source of the text box's property dialog box?

    I am not sure of the "exact" place to enter that
    expression, and I am guessing I am not putting it in the
    right place as the shading is not occurring.

    The rest seems pretty straight forward and I did that.
    Though no formatting has taken place in the report, on
    every other line or every line, so I assume no conditions
    are being met by the "conditional formatting" dialog box.

    Any futher clarification would be greatly appreciated. I
    am using MS Access 2000. THANKS!

    Joe


    >-----Original Message-----
    >Joe wrote:
    >>Looking for a way to print reports with every other line
    >>shaded...but without code. I have had reports (phone
    >>lists, etc.) print this way a loooong time ago, but

    cannot
    >>figure out how I got it to happen.

    >
    >
    >It's simpler using code.
    >
    >Without code, if you're using A2K or later, First, add a
    >text box named txtLineCtr, make it invisible and set its
    >expression to =1.
    >
    >Make the BackStyle of all of your current controls
    >Transparent.
    >
    >Then add another text box (the same size as the entire
    >detail section) and use The Format - Send To Back menu

    item
    >to put it behind all the other controls. Now you can set
    >tis text box's Conditional Formatting - Expression Is
    > txtLineCtr Mod 2 = 0
    >with your selected background color.
    >
    >--
    >Marsh
    >MVP [MS Access]
    >.
    >
     
    Joe, May 4, 2004
    #3
  4. Whoops... :-(

    I forgot to tell you to set the txtLineCtr text box's
    RunningSum property to Over All, under the text box's
    property sheet's Data tab.

    The =1 goes in the text box's CountrolSource property, also
    under the Data tab.

    The Visible property is under the Property sheet's Format
    tab.


    Joe wrote:
    >Quick follow up. When you say make the first text
    >invisible, I assume you mean under the format menu,
    >visible, and click "no." But I am not sure where to put
    >the "expression" of "=1." Is that under tab Data, then
    >Control Source of the text box's property dialog box?
    >
    >I am not sure of the "exact" place to enter that
    >expression, and I am guessing I am not putting it in the
    >right place as the shading is not occurring.
    >
    >The rest seems pretty straight forward and I did that.
    >Though no formatting has taken place in the report, on
    >every other line or every line, so I assume no conditions
    >are being met by the "conditional formatting" dialog box.
    >
    >Any futher clarification would be greatly appreciated. I
    >am using MS Access 2000. THANKS!
    >
    >>-----Original Message-----
    >>Joe wrote:
    >>>Looking for a way to print reports with every other line
    >>>shaded...but without code. I have had reports (phone
    >>>lists, etc.) print this way a loooong time ago, but

    >cannot
    >>>figure out how I got it to happen.

    >>
    >>

    >Marshall Barton wrote:
    >>It's simpler using code.
    >>
    >>Without code, if you're using A2K or later, First, add a
    >>text box named txtLineCtr, make it invisible and set its
    >>expression to =1.
    >>
    >>Make the BackStyle of all of your current controls
    >>Transparent.
    >>
    >>Then add another text box (the same size as the entire
    >>detail section) and use The Format - Send To Back menu

    >item
    >>to put it behind all the other controls. Now you can set
    >>tis text box's Conditional Formatting - Expression Is
    >> txtLineCtr Mod 2 = 0
    >>with your selected background color.


    --
    Marsh
    MVP [MS Access]
     
    Marshall Barton, May 4, 2004
    #4

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guest

    How do I shade every other row in an Access report?

    Guest, Sep 27, 2004, in forum: Microsoft Access Reports
    Replies:
    3
    Views:
    1,540
    Fons Ponsioen
    Sep 27, 2004
  2. Jim Benson

    Graying of alternate lines of a report

    Jim Benson, Sep 17, 2005, in forum: Microsoft Access Reports
    Replies:
    1
    Views:
    153
    Marshall Barton
    Sep 18, 2005
  3. Guest
    Replies:
    2
    Views:
    203
    fredg
    Feb 17, 2006
  4. Daveo

    Colouring alternate detail lines code doesn't work

    Daveo, Nov 23, 2006, in forum: Microsoft Access Reports
    Replies:
    1
    Views:
    161
    Rick Brandt
    Nov 23, 2006
  5. Paul

    how do you shade alternating lines in a tabular report

    Paul, Aug 27, 2009, in forum: Microsoft Access Reports
    Replies:
    11
    Views:
    504
    Gina Whipp
    Aug 30, 2009
Loading...

Share This Page