Results 1 to 5 of 5
  1. #1
    dmvpia is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Oct 2019
    Posts
    3

    Looping a running sum

    How do I create a LINE NUMBER to number each of the 36 rows of (Detail Section) data that are displayed for each page of my report? (There's a total of 625 detail lines.)



    The rows would be numbered 1 through 36 on Page 1, then begin at 1 again on Page 2 (for line #37), and so forth until the end of the report. The 625 lines, divided by the 36 lines per page, equals 17 full pages and a partial Page 18 which consists of the last 13 lines (which would be numbered 1 through 13)

    I can create a text box that does the numbering, by selecting the Running Sum property, but I need the running sum to be for each page. The Running Sum property limits me to summing Over Group (which is my 625 lines) or Over All (which is also the 625 lines).

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    in the query add a calculated field: Counter:1
    then in the report use it as a running sum.

  3. #3
    accesstos's Avatar
    accesstos is offline Expert
    Windows XP Access 2007
    Join Date
    Dec 2018
    Location
    Greece
    Posts
    551
    Type this expression in a new unbound textbox in Detail section: =[txtRS]-(([Page]-1)*36)

    txtRS is the Running Sum textbox.

  4. #4
    dmvpia is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Oct 2019
    Posts
    3

    This did the trick,

    Quote Originally Posted by accesstos View Post
    Type this expression in a new unbound textbox in Detail section: =[txtRS]-(([Page]-1)*36)

    txtRS is the Running Sum textbox.
    thank you!

  5. #5
    accesstos's Avatar
    accesstos is offline Expert
    Windows XP Access 2007
    Join Date
    Dec 2018
    Location
    Greece
    Posts
    551
    You are welcome!

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

Similar Threads

  1. Need help with Looping
    By lccrews in forum Programming
    Replies: 5
    Last Post: 11-02-2018, 05:37 PM
  2. Help with Looping Records
    By jtm013 in forum Programming
    Replies: 7
    Last Post: 04-30-2015, 01:39 PM
  3. Looping thru fields.
    By Newby in forum Access
    Replies: 4
    Last Post: 01-29-2013, 03:42 PM
  4. Looping
    By ddrew in forum Forms
    Replies: 8
    Last Post: 10-08-2012, 01:48 AM
  5. Looping to Calculate Running GPA
    By tonere in forum Programming
    Replies: 12
    Last Post: 03-15-2012, 07:25 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