Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report with "manual" table of contents

Status
Not open for further replies.

bfamo

Technical User
Feb 16, 2006
132
0
0
NO
Hello everyone!

I'm building a report with 5 subreports in it. Each of the 5 subreports is divided by a page break in between. The reason for using these subreports is that I have to include a lot of graphs in the report, and each of the subreports is based on different tables.

Now, I'm also going to need a table of contents. I've been reading up on the subject, and most of the forum posts and how-to guides gives more or less the same version as the KB131588 article.

Is it possible to build a static table of contents using text labels and some VBA code that can track the page number of a control such as subreport or a textbox?

Thanks!!
 
thanks dhookom,

I'll try out your suggestion and post the result.

I initially tried to put a textbox (txtSub1, txtSub2 etc...) next to each subreport with control source "=[Page]". This gave me the page numbers I wanted. It was a long shot, but I tried to write some code that would copy these page numbers to my manual table of contents:

Code:
me.txtTocSub1 = me.txtSub1

The problem is that I have to run this code in the reports On_Format event, which is a bit too early.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top