E
Elsie
hi, think I got the hang of it... except for this: Under Function UpdateToc,
I added an extra item to become:
Function UpdateToc(TocEntry As String, dest As String, Rpt As Report)
where TocEntry is customer code, dest is the ship-to destination for each
customer.
The original code from http://support.microsoft.com/?id=210269 is:
Function UpdateToc(TocEntry As String, dest 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.AddNew
TocTable!Description = TocEntry
TocTable![dest] = dest
TocTable![page number] = intPageCounter
TocTable.Update
End If
End Function
The above code will only record the 1st ship-to destination for each
customer. I need all the ship-to for each customer. I know its due to
TocTable.NoMatch -- since the customer code is the same, just the ship-to
is different, the remaining ship-to will not be recorded.
How do I add in dest to 'TocTable.Seek "=", TocEntry'?
I added an extra item to become:
Function UpdateToc(TocEntry As String, dest As String, Rpt As Report)
where TocEntry is customer code, dest is the ship-to destination for each
customer.
The original code from http://support.microsoft.com/?id=210269 is:
Function UpdateToc(TocEntry As String, dest 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.AddNew
TocTable!Description = TocEntry
TocTable![dest] = dest
TocTable![page number] = intPageCounter
TocTable.Update
End If
End Function
The above code will only record the 1st ship-to destination for each
customer. I need all the ship-to for each customer. I know its due to
TocTable.NoMatch -- since the customer code is the same, just the ship-to
is different, the remaining ship-to will not be recorded.
How do I add in dest to 'TocTable.Seek "=", TocEntry'?