I just had a really helpful answer from JimD to a question I posted a few minutes ago and wanted to add a second question but accepted it too fast.
I am now stuck on the second procedure in the article "How to Create a Table of Contents or Index for a Report" kbid=210269. When I run the report I get a message "The expression on click produced the following error Type Mismatch".
Under the MainSection header I have put =UpdateToC([MainSection],R
eport) as stated in the article. When I run this in the Nortwind database it runs like a dream so it must be something in my table but I'm stuck as to what.
Function UpdateToC(ToCEntry As String, Rpt As Report)
'Call from the OnPrint Property of the section containing
'The Table of Contents Description Field
'Updates the Table of Contents table.
ToCTable.Seek "=", ToCEntry
If ToCTable.NoMatch Then
ToCTable!Description = ToCEntry
ToCTable![Page number] = IntPageCounter