Results 1 to 5 of 5
  1. #1
    Star Lounger
    Join Date
    Oct 2003
    Location
    Nashville, Tennessee, USA
    Posts
    51
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Have 'Continue' in Group Header (Access97)

    Is there away to have "Continue" appear in the group header if the group goes to the next page?
    The below idea works, however it requires to force a new page after group footer. Which in my circumstance, would be a great waste of paper.

    1. Sort and group on Product, with both a Group Header and Group Footer.
    2. Set the Product Group Footer to Force New Page after section.
    3. Put a label in the Product Header. The label's name is "lblContinued" (without the quotes) and the label shows "Continued" (again without the quotes)
    4. Set the Product Header's Repeat Section property to Yes (this is an important step!)
    5. In the Product Header's Format event, I put this code...
    Static strProduct As String
    lblContinued.Visible = (Product = strProduct)
    strProduct = Product

    So the entire code in the Format event is
    Private Sub GroupHeader0_Format(Cancel As Integer, FormatCount As Integer)
    Static strProduct As String

    lblContinued.Visible = (Product = strProduct)
    strProduct = Product
    End Sub


    Does anyone have any ideas as to how "Continue" in the group header may be accomplished?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Have 'Continue' in Group Header (Access97)

    MSKB article ACC97: How to Reset the Page Number and Total Page Count for Each Section of a Report describes a method to determine the page number within a group and the number of pages per group in a report. You can use this technique to display "Continue" if the page number within the group is less than the total number of pages in the group.

  3. #3
    Star Lounger
    Join Date
    Oct 2003
    Location
    Nashville, Tennessee, USA
    Posts
    51
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Have 'Continue' in Group Header (Access97)

    I have tried using the code provided by the article to first see how it groups. However, even after cutting and pasting, the "Runtime Error 3219" Invalid Operation appears. It takes me directly to:
    Set GrpPages = DB.OpenRecordset("Plant Pages", DB_OPEN_TABLE)
    The only changes I made from the article is that changed [Country] to [Plant] and the table name to Plant Pages not Country Group Pages. This was done to have the table use the same field that is being grouped by [Plant].

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Have 'Continue' in Group Header (Access97)

    Check the following:
    - Did you create the table Plant Pages?
    - Did you declare DB and GrpPages at the top of the module?
    - Did you set DB a few lines above the offending line?

  5. #5
    Star Lounger
    Join Date
    Oct 2003
    Location
    Nashville, Tennessee, USA
    Posts
    51
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Have 'Continue' in Group Header (Access97)

    <P ID="edit" class=small>(Edited by WendellB on 05-Nov-03 09:09. activate link to MSKB article)</P>I was able to find article <!mskb=182823>Microsoft Knowledge Base Article 182823<!/mskb> which puts "Continued" in the page header. All I had to do from that was to do some "formatting tweeking" to make it appear that "Continued" is in the group header. Thank you for pointing me in the right direction!

    Again,

    Thank you,

    PBrown

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •