Page 2 of 5 FirstFirst 12345 LastLast
Results 16 to 30 of 71
  1. #16
    pharrison74 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2016
    Posts
    114

    Never mind I was being dumb as always...However I do see that title twice now.

    Click image for larger version. 

Name:	Capture.JPG 
Views:	9 
Size:	22.7 KB 
ID:	23731

  2. #17
    cyanidem's Avatar
    cyanidem is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    Nov 2015
    Location
    Consett, UK
    Posts
    270
    Have you set different title in UpdateToc() function in each report?
    Click image for larger version. 

Name:	tocc1.jpg 
Views:	9 
Size:	54.3 KB 
ID:	23732

    Click image for larger version. 

Name:	tocc2.jpg 
Views:	9 
Size:	51.8 KB 
ID:	23733

    Click image for larger version. 

Name:	tocc3.jpg 
Views:	9 
Size:	31.0 KB 
ID:	23734

  3. #18
    pharrison74 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2016
    Posts
    114
    Yeah it is all setup like you said as far as I can see.Click image for larger version. 

Name:	Capture.JPG 
Views:	8 
Size:	34.2 KB 
ID:	23736Click image for larger version. 

Name:	Capture.JPG 
Views:	8 
Size:	34.2 KB 
ID:	23736

  4. #19
    cyanidem's Avatar
    cyanidem is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    Nov 2015
    Location
    Consett, UK
    Posts
    270
    Check also group&sort configuration. Or upload your db so I can check it.

  5. #20
    pharrison74 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2016
    Posts
    114
    Testing_Litigation_DB1.zip

    Here you go. Figure this is easier then dealing with my dumb ass..

    Thanks again.
    Pete

  6. #21
    cyanidem's Avatar
    cyanidem is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    Nov 2015
    Location
    Consett, UK
    Posts
    270
    Ok.
    That "Title" textbox needs to be in Title Header section, not in Description Header
    Just move it there and you're good.

    Click image for larger version. 

Name:	toc1.png 
Views:	8 
Size:	18.2 KB 
ID:	23739

  7. #22
    pharrison74 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2016
    Posts
    114
    Thought that might be it. How do I moved the Title header above the description header? Or do I have to delete both and start again?Click image for larger version. 

Name:	Capture.JPG 
Views:	8 
Size:	28.0 KB 
ID:	23740

  8. #23
    cyanidem's Avatar
    cyanidem is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    Nov 2015
    Location
    Consett, UK
    Posts
    270
    Just change group&sort options, headers will move accordingly.

  9. #24
    pharrison74 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2016
    Posts
    114
    Ok, so everything is working, however it is still showing all entries are on page 1. As well for some reason I have to print preview Decisions release last or it won't show on the table of contents list.

    Click image for larger version. 

Name:	Capture.JPG 
Views:	8 
Size:	34.3 KB 
ID:	23741

  10. #25
    cyanidem's Avatar
    cyanidem is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    Nov 2015
    Location
    Consett, UK
    Posts
    270
    Well, aren't they on page(s) 1 of relevant reports? It counts pages of each report separately so...
    Also, one report has InitToc() function in its Open event, so that one has to be printed first. If you want it to be "Decision released" then move InitToc() to that one and print it first.
    Or remove it completely and call it somehow (some button Click event i.e.) before printing any report and then the printing order won't matter.

  11. #26
    pharrison74 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2016
    Posts
    114
    Even with that change it still puts Awaiting Decisions first even when print previewing Decisions first.

    Yeah, I have had to make 3 separate reports that will actually once printed out be one. I am emulating a report we have in word. So it will need to count the pages correctly somehow if possible.

  12. #27
    cyanidem's Avatar
    cyanidem is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    Nov 2015
    Location
    Consett, UK
    Posts
    270
    Quote Originally Posted by pharrison74 View Post
    Even with that change it still puts Awaiting Decisions first even when print previewing Decisions first.
    It's because you have ToC report sorted by Title (alphabetically). Maybe try add some numbers to the title parameter? Like "I. Decisions Released", "II. Awaiting Decisions" or whatever suits you.

    Quote Originally Posted by pharrison74 View Post
    Yeah, I have had to make 3 separate reports that will actually once printed out be one. I am emulating a report we have in word. So it will need to count the pages correctly somehow if possible.
    I guess you could make one master report and place those 3 as subreports? Worth a try but will probably need some changes in code.

  13. #28
    pharrison74 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2016
    Posts
    114
    Ok will make that change. Never done sub reports but it is worth a try will do some research on it.


    Thank you

  14. #29
    cyanidem's Avatar
    cyanidem is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    Nov 2015
    Location
    Consett, UK
    Posts
    270
    Here's another idea, can't test it now but you may try this:
    1. Make some changes (marked in red) to your module code:
    Code:
    Option Compare Database
    Option Explicit
             
    Dim db As Database
    Dim toctable As Recordset
    Public NoOfPages As Integer
    
    
    
    
    Function InitToc()
                Dim qd As QueryDef
                NoOfPages = 0
                Set db = CurrentDb()
                Set qd = db.CreateQueryDef _
                    ("", "Delete * From [Table1]")
                qd.Execute
                qd.Close
                Set toctable = db.OpenRecordset("Table1", _
                   DB_OPEN_TABLE)
                toctable.Index = "Case_Name"
             End Function
             
    Function UpdateToc(tocentry As String, Rpt As Report, sTitle As String)
       toctable.Seek "=", tocentry
       If toctable.NoMatch Then
          toctable.AddNew
          toctable!Case_Name = tocentry
          toctable![page number] = NoOfPages + 1
          toctable!Title = sTitle
          toctable.Update
       End If
    End Function
    And add this code to OnPrint event of Page Footer of every report (not ToC report):

    Code:
        NoOfPages = Report.Page
    The rest remains the same: print preview each report, cycle through pages then print ToC report.
    If it doesn't work as expected, we'll try fine tune it later

  15. #30
    pharrison74 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2016
    Posts
    114
    Put the code in. Threw an error. Guessing we need something in this line.. Function UpdateToc(tocentry As String, Rpt As Report, sTitle As String)

    could be completely wrong on that lol.


    Click image for larger version. 

Name:	Capture.JPG 
Views:	7 
Size:	31.3 KB 
ID:	23750

    And as well a variable is not set. Highlights the following

    Click image for larger version. 

Name:	Capture2.JPG 
Views:	6 
Size:	42.0 KB 
ID:	23752

Page 2 of 5 FirstFirst 12345 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 03-04-2014, 04:58 PM
  2. Table of Contents
    By Alex Motilal in forum Reports
    Replies: 1
    Last Post: 09-17-2012, 10:48 AM
  3. Replies: 5
    Last Post: 04-18-2012, 12:04 PM
  4. Replies: 10
    Last Post: 01-06-2012, 07:46 AM
  5. Print Separate Reports with collate
    By HendriX99 in forum Reports
    Replies: 3
    Last Post: 02-04-2011, 07:46 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums