• Using on page in report (2003)

    Author
    Topic
    #456795

    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

    Viewing 0 reply threads
    Author
    Replies
    • #1142936

      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.

      • #1143113

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

    Viewing 0 reply threads
    Reply To: Using on page in report (2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: