Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Feb 2003
    Location
    Warwick, Warwickshire, England
    Posts
    189
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Using on page in report (2003)

    I have a report which produces one page of output for each line of data in my table.
    I use criteria to select which records I want to appear in the report.
    All works well with this.

    What I now want to do is to run a query at the end of each page (hence using On Page) which updates the data record to identify the time it was printed. I use the criteria [Reports]![ReportName]![UniqueField] ina query to do this.
    I found that it doesn't work for the first record in the report. Instead it has already moved on to the next record before the On Page query has been run. This seems to go against what I would have thought ON PAGE meant - using the details on the current page. (I checked the current value of [UniqueField] via a msgbox run before and after the query was run).

    Am I doing something wrong - or is this the way this work?

    Any other solutions to update the records as they are printed?

    I thought about running the query after the report was produced with the same critera, but realised you can't include criteria against a cmddo.openquery


    John

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

    Re: Using on page in report (2003)

    I tested with several reports, and the On Page event occurred for the first page too in all of them. It didn't matter whether I previewed the report or printed it directly.

    But since you have one page per record, you could use the On Format or On Print event of the detail section of the report instead.

  3. #3
    2 Star Lounger
    Join Date
    Feb 2003
    Location
    Warwick, Warwickshire, England
    Posts
    189
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Using on page in report (2003)

    Thanks Hans
    I've never used the On Format / On Print in the sections before - works just as I need it.
    Many thanks
    John

Posting Permissions

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