creating a TOC from a report

A

Amit

Windows XP, MS Access 2K
========================

I have a question regarding creating a table of contents
for a report. I checked the following web-site and figured
out how to create the TOC:
http://support.microsoft.com/?kbid=210269

But, I'm somewhat uncertain about how to proceed if I want
to capture 2 fields instead of one, in addition to the
page number. Here's my approach:

1. In the OnPrint property of the report, do:
=UpdateToc([CategoryName] & "*" & [field2],[Report])

2. Modify the function UpdateToc to parse TocEntry using
string functions and get the 2 different fields, and then
assign them to the appropriate fields in the table.

'pseudo-code
Dim field1 as string, field2 as string
field1 = parse(TocEntry)
field2 = parse(TocEntry)
toctable!Description = field1
toctable!SerialNum = field2

Please let me know if there is an easier way to accomplish
this.

Thanks!

-Amit
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top