I have a report on my MS Access application which I would like to create a Table Of Content for. The problem is that MS Access cant do this automatically.
The solution I'm working with now is to create a table that stores the Headings and Page numbers when a Header is printed in the report. This works fine but the problem is that I have to scroll through my detailed rapport to store all the Heading page numbers in my t_TOC table.
The length of my detailed rapport vary a lot and it is not a good solution to let the user scroll through this rapport and then generate a TOC and finally print them out separately.
Is there a way to open the report in VBA (DoCmd.OpenReport "Report", acViewPreview)
And then run to the last page? .. or do any of you have any other solutions?
I want my main report to look like this:
- Cover Page [Main Report]
- Table Of Contents [Subreport]
- Details (vary from 13-230 pages) [Subreport]
The solution I'm working with now is to create a table that stores the Headings and Page numbers when a Header is printed in the report. This works fine but the problem is that I have to scroll through my detailed rapport to store all the Heading page numbers in my t_TOC table.
The length of my detailed rapport vary a lot and it is not a good solution to let the user scroll through this rapport and then generate a TOC and finally print them out separately.
Is there a way to open the report in VBA (DoCmd.OpenReport "Report", acViewPreview)
And then run to the last page? .. or do any of you have any other solutions?
I want my main report to look like this:
- Cover Page [Main Report]
- Table Of Contents [Subreport]
- Details (vary from 13-230 pages) [Subreport]
Last edited: