I have written some code to create a table of contents for a report I have created. I have code in the Detail_Print event so that as you move from the first record to the last record in the report it writes the page number and description to a table. Then I can use this table to show a report on the table of contents.
My problem is the only way I know how to populate the table of contents is to click through each record. How can I accomplish this through code? I want it to go through each record when the report is opened so that the table of contents will be fully populated.
My problem is the only way I know how to populate the table of contents is to click through each record. How can I accomplish this through code? I want it to go through each record when the report is opened so that the table of contents will be fully populated.