N
NevilleT
I am not sure this can be done but I will ask the question anyway.
I am creating a table of contents using the method suggested by Microsoft.
By using the On Print event for the header, I write the header record and
page number to a table, then read the table to create the ToC in a separate
report.
My problem is that I have to either print the whole report, or page through
the report manually to create the records in the ToC table. If I can somehow
do a print preview, then page through the print preview using VBA, I could
create the table of contents records and run the ToC as a subreport. I can
then print the report and the ToC will be where it should be - at the front
of the report.
I am creating a table of contents using the method suggested by Microsoft.
By using the On Print event for the header, I write the header record and
page number to a table, then read the table to create the ToC in a separate
report.
My problem is that I have to either print the whole report, or page through
the report manually to create the records in the ToC table. If I can somehow
do a print preview, then page through the print preview using VBA, I could
create the table of contents records and run the ToC as a subreport. I can
then print the report and the ToC will be where it should be - at the front
of the report.