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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

adding an index menu

Status
Not open for further replies.

mike91

Programmer
Aug 13, 2002
14
GB
I have produced a report in Access a book seller to produce a brochure. the columns are

Author | Title | Desc | Quality | Price

I have seperated them by Aurthor in alaphabetical ASC order, which is great.

However on the front page I would like to be able to produce an Index of all the authors and a page number that they appear on. Is this possible - there is nothing in the help menu's on this and it should be achievable as you can do something similar in Word

any help very very much appeciated

regards Mike
 
Well at the top of my head, this is what I can come up with. There may be something easier than this.....

Try inserting a SubReport that is your formatted index list in the Report Header. That way at the beginning of each report printed, your index will process and display first.

As for displaying which page an entry is on in the SubReport, you need to know how many entrys there are per page first. Then extrapolate from that knowledge and apply it to your query supporting your subreport. For example...

In this case, I am assuming that there are 15 entries per page. Based on this knowledge, the format function returns the whole number calculation of the result, which is the page number they are on.
SELECT Author, Title, Format(([ID] / 15)+1, "#") as PageNumber FROM MyTable;

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top