how to create a TOC with groupHeader 1 and groupHeader 2 (1 Viewer)

Smilemax

New member
Local time
Today, 21:33
Joined
Mar 14, 2023
Messages
3
Hi, I have successfully created a TOC by running a report for the GroupHeader1 which exists on all pages
The Report has on some pages also a GroupHeader2. The print and sort is fine. However, I didn't figure out how to get the GroupHeader2 to be added to a TOCtable.
Anyboy has a running VBA Code for this?
TOC.jpg

Thanks in advance for any help.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 22:33
Joined
May 7, 2009
Messages
19,245
how did you create the Table?
group header1 table must have pk field.
then create another table (with foreign key to group header1 table)
move all group header2 to this table.
create a report for group header2 table and put it on your first report as sub report.
 

jdraw

Super Moderator
Staff member
Local time
Today, 10:33
Joined
Jan 23, 2006
Messages
15,379
You may get some insight from this video by Duane Hookom

Table of Contents in Access Report​

 

Smilemax

New member
Local time
Today, 21:33
Joined
Mar 14, 2023
Messages
3
how did you create the Table?
group header1 table must have pk field.
then create another table (with foreign key to group header1 table)
move all group header2 to this table.
create a report for group header2 table and put it on your first report as sub report.
Hi jdraw, thanks for quick reply.
Sorry I was not specific enough. To merge two or more tables is not the issue. The unclear field here is
how to create a table of content (TOC) from a report for the GroupHeader2
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 09:33
Joined
Feb 28, 2001
Messages
27,187
The question is, how did you create the report for GroupHeader1 entries? And how did you get those entries there? Because if you called some subroutine to enter the group header 1 entry, call the same subroutine for the group header 2 entry. If that isn't how you are doing it, then how DID you do it? Because in the absence of knowing what tools you are using, we can't give you a good blueprint.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 22:33
Joined
May 7, 2009
Messages
19,245
see this demo.
i add "level" to TOC table.
open SampleReport (in print preview) to generate the TOC.
open tableOfContentReport.
 

Attachments

  • dbTableOfContentReport.accdb
    552 KB · Views: 66

Users who are viewing this thread

Top Bottom