report subform print control

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Evets Htims

    report subform print control

    This is Access 2003. Have a report that includes three subreports
    stacked on top of one another (they display order items). In the
    report On Open I build a recordset (to get a value from a foreign
    table that determines which of the subforms is used to preview the
    items) and On Activate I run a case select that sets visable =
    true/false for each subreport. This displays and prints fine from a
    preview. If I open the report directly to print it prints all 3
    subreports, apparently skipping the On Activate.
    So my question is where can I run my case select when opening a report
    in Print without preview?
  • Larry Linson

    #2
    Re: report subform print control

    You can execute code in the Open event, or you can execute it in each
    record in the Format or Print events -- these fire whether you are in
    Preview or in Print. I generally prefer the Print event because the
    Format event may fire many times. It may seem a waste to execute the
    code for each record, but unless it is very, very, very complex,
    you'll never see the extra time it takes.

    Larry Linson
    Microsoft Access MVP



    siklone69@yahoo .com (Evets Htims) wrote in message news:<8b9a5be5. 0408101252.5cba ba69@posting.go ogle.com>...[color=blue]
    > This is Access 2003. Have a report that includes three subreports
    > stacked on top of one another (they display order items). In the
    > report On Open I build a recordset (to get a value from a foreign
    > table that determines which of the subforms is used to preview the
    > items) and On Activate I run a case select that sets visable =
    > true/false for each subreport. This displays and prints fine from a
    > preview. If I open the report directly to print it prints all 3
    > subreports, apparently skipping the On Activate.
    > So my question is where can I run my case select when opening a report
    > in Print without preview?[/color]

    Comment

    Working...