Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Apr 2002
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Print Preview and Grand Totals (Access 97)

    The client wanted a status field to print on the report

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

    Re: Print Preview and Grand Totals (Access 97)

    I'd move all code from Detail1_Print to Detail1_Format.
    According to the online help, the OnPrint event only occurs for sections that are actually displayed/printed, while OnFormat occurs always. So for running totals, one should use the OnFormat event.

  3. #3
    New Lounger
    Join Date
    Apr 2002
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Print Preview and Grand Totals (Access 97)

    Thank you for your quick reply. We tried this and it didn't work. The totals that are generated by Access are correct at the bottom. The ones that we are using counters for are wrong. We are looking into DSUM now.

  4. #4
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Print Preview and Grand Totals (Access 97)

    What I have found when I do this kind of thing is that it is a whole lot better if you calculate the fields in the query behind the report.

    Then theres no need to do the Calc in the Format event of the Detail section whether or not the PCount = 1 or not, and even then the thing cannot add up.

    Introduce a couple of fields in the query like:

    iif(isnull(YourDate),1,0) as PendingCount, iif(isnull(YourDate),0,1) as ActiveCount

    HTH
    Pat

  5. #5
    New Lounger
    Join Date
    Apr 2002
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Print Preview and Grand Totals (Access 97)

    Thanks for the tip. We ended up calling Microsoft and they told us to use the Snapshot Viewer. Seems that print preview can't handle what we were doing.

Posting Permissions

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