Results 1 to 8 of 8
  1. #1
    5 Star Lounger
    Join Date
    May 2001
    Location
    Patterson Lakes, Melbourne, Victoria, Australia
    Posts
    637
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Change backcolor on print (2002 SP3)

    I am trying to change a forms Detail.Backcolor when printing. I have tried using AfterLayout, BeforeRender & AfterRender Events, but these don
    Regards,
    Peter

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Change backcolor on print (2002 SP3)

    If you mean that you want to change the BackColor only when printing, not when previewing, that's tricky - Access doesn't really distinguish between previewing and printing.

    To change the background color in preview and print, you'd use the On Format event of the Detail section, see <post:=540,709>post 540,709</post:> for an example.

    The AfterLayout, BeforeRender and AfterRender events apply to forms, not to reports, and they have to do with PivotCharts.

  3. #3
    5 Star Lounger
    Join Date
    May 2001
    Location
    Patterson Lakes, Melbourne, Victoria, Australia
    Posts
    637
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Change backcolor on print (2002 SP3)

    Thanks Hans, but that was for a report, thisis for a form. No probs on the change being for both Preview & Print.
    Regards,
    Peter

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Change backcolor on print (2002 SP3)

    Sorry, I didn't read your original question carefully enough.

    You can place a text box in the Detail section and stretch it so that it covers the entire section.
    Set the Control Source of the text box to a field or expression that relate to the way you want to change the color.
    Use Format | Conditional Formatting to set the fill color.
    Finally, send the text box to the background, behind all other controls.

    Also, see <post:=382,292>post 382,292</post:> for alternative methods.

  5. #5
    5 Star Lounger
    Join Date
    May 2001
    Location
    Patterson Lakes, Melbourne, Victoria, Australia
    Posts
    637
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Change backcolor on print (2002 SP3)

    Already doing that for one control that shows which record has the focus. Need to do it this way as the variable number of controls don't always fill the form width and this looks better than individual controls changing colour.
    Looks like I will have to compromise on visual quality or build a report. Does seem strange that Access forms don
    Regards,
    Peter

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Change backcolor on print (2002 SP3)

    Forms aren't really meant to be printed.

  7. #7
    5 Star Lounger
    Join Date
    May 2001
    Location
    Patterson Lakes, Melbourne, Victoria, Australia
    Posts
    637
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Change backcolor on print (2002 SP3)

    Shame Microsoft don't put in this functionality as in this case (and many other cases) it would save a heeeeeeeap of time.
    Thanks anyway Hans
    Regards,
    Peter

  8. #8
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Change backcolor on print (2002 SP3)

    Forms are interactive by design. Printing is static by design. There are reasons not to try to hybridize them.
    Charlotte

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •