By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,025 Members | 2,118 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,025 IT Pros & Developers. It's quick & easy.

Reports - can I create an index?

P: n/a
I have a report which has several sub reports. Each sub report starts on its
own page, and may be 2 or 3 pages long.

I'd like to create an index on the first page of the main report. Something
like:

Clients..............p1
Sales................p3
Salesmen.........p4

I'm not sure how I would do this, as I don't know before hand what page a
sub report will start on.
Is this even possible?
Thanks
Vayse
Aug 31 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
See:
How to Create a Table of Contents or Index for a Report
at:
http://support.microsoft.com/kb/210269/en-us

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Vayse" <va***@deadspam.comwrote in message
news:zD*******************@news.indigo.ie...
>I have a report which has several sub reports. Each sub report starts on
its own page, and may be 2 or 3 pages long.

I'd like to create an index on the first page of the main report.
Something like:

Clients..............p1
Sales................p3
Salesmen.........p4

I'm not sure how I would do this, as I don't know before hand what page a
sub report will start on.
Is this even possible?
Thanks
Vayse

Sep 1 '06 #2

P: n/a
Thanks. I'm using an ADP, so I can't use temp tables, but I'll be change the
code to use an array easily enough.

The kb method requires the report to open to generate the TOC. Is is
possible that I could open the report once, close it through code, then re
open. When I re open I would have the information required for the TOC. Is
there a way to open the report 'invisibly' the first time? Or even a way of
closing it?
Thanks
Vayse

"Allen Browne" <Al*********@SeeSig.Invalidwrote in message
news:44***********************@per-qv1-newsreader-01.iinet.net.au...
See:
How to Create a Table of Contents or Index for a Report
at:
http://support.microsoft.com/kb/210269/en-us

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Vayse" <va***@deadspam.comwrote in message
news:zD*******************@news.indigo.ie...
>>I have a report which has several sub reports. Each sub report starts on
its own page, and may be 2 or 3 pages long.

I'd like to create an index on the first page of the main report.
Something like:

Clients..............p1
Sales................p3
Salesmen.........p4

I'm not sure how I would do this, as I don't know before hand what page a
sub report will start on.
Is this even possible?
Thanks
Vayse


Sep 1 '06 #3

P: n/a
In the lastest versions of Access you can open it hidden:
DoCmd.OpenReport "Report1", acViewPreview, WindowMode:=acHidden

Closing it programmatically is:
DoCmd.Close acReport "Report1"

The real problem with that approach is that Access only fires the events of
the sections for the pages it has to format. That means it needs to walk
through all the pages to generate the TOC. I haven't tried this, but you
might be able to output the report to the nul: device as a way of forcing it
to walk through its pages and generate the contents data:
DoCmd.OutputTo acOutputReport, "Report1", acformatTXT, "nul:"

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Vayse" <va***@deadspam.comwrote in message
news:Zn*******************@news.indigo.ie...
Thanks. I'm using an ADP, so I can't use temp tables, but I'll be change
the code to use an array easily enough.

The kb method requires the report to open to generate the TOC. Is is
possible that I could open the report once, close it through code, then re
open. When I re open I would have the information required for the TOC. Is
there a way to open the report 'invisibly' the first time? Or even a way
of closing it?
Thanks
Vayse

"Allen Browne" <Al*********@SeeSig.Invalidwrote in message
news:44***********************@per-qv1-newsreader-01.iinet.net.au...
>See:
How to Create a Table of Contents or Index for a Report
at:
http://support.microsoft.com/kb/210269/en-us

"Vayse" <va***@deadspam.comwrote in message
news:zD*******************@news.indigo.ie...
>>>I have a report which has several sub reports. Each sub report starts on
its own page, and may be 2 or 3 pages long.

I'd like to create an index on the first page of the main report.
Something like:

Clients..............p1
Sales................p3
Salesmen.........p4

I'm not sure how I would do this, as I don't know before hand what page
a sub report will start on.
Is this even possible?
Thanks
Vayse

Sep 1 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.