Results 1 to 3 of 3
  1. #1
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,071

    Question Custom Page Numbering Help


    I have a large report in MS Access 2010 The report contains 3 Group sections. I have the report set to create a new page when the first group section changes. I would like the Page Number to reset to 1 when this happens. Anybody have an idea on how to do this. I tried creating a long Integer variable in the report and in the Group Header On format event set the variable = 1. I set an unbound text box in the page footer section and placed code in the onformat event of the page footer section to set the unbound text box = to the variable and increment the variable. I ended up with Page 1 on every page. HHHEEEELLLLLPPPPP!

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,071
    Thanks June 7 That led me to the answer. It didn't work directly because I was Repeating the Header on each page so every page was 1 but with a little code in the Onformat event of the header I got it to work. I created a Private Variable for the report and set the Variable = to the Group Field. Then added an if statement


    If strvar = "" then
    strvar = pcpid
    Else
    If strvar <> pcpid Then
    Runmacro "macnewpage"
    strvar = pcpid
    End if
    End if
    That worked perfectly

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Sequencial numbering
    By spQQky in forum Forms
    Replies: 1
    Last Post: 01-27-2012, 03:16 PM
  2. Page numbering
    By gumberculies in forum Reports
    Replies: 1
    Last Post: 04-11-2011, 02:21 PM
  3. Page break on report inserts empty page between
    By Galadrielle in forum Reports
    Replies: 0
    Last Post: 07-07-2010, 04:18 AM
  4. Numbering records
    By knightjp in forum Database Design
    Replies: 0
    Last Post: 08-17-2008, 07:07 AM
  5. Page numbering glitch
    By kfinpgh in forum Reports
    Replies: 3
    Last Post: 08-17-2006, 08:23 PM

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