Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2005
    Posts
    87

    Unanswered: Running Sum in two sub-reports ?

    I have two subreports, in both of them there is one field that has control source "=1" and running sum = Yes. So each new line in detail section has number that shows which line it is (first,second,etc,etc).

    The same is in both sub-reports, but second subreport starts from 1 again...is it possible to make it start from where first report ended?

    E.g. First sub-report has 5 lines so last line has number "5" in that field. I want second sub-report to start from number "6" and then 7 , 8 etc...

    Is it possible somehow?


    Thank you

  2. #2
    Join Date
    Jul 2004
    Location
    Southampton, UK
    Posts
    368
    Just a wild stab in the dark here but you could write some code to count the number of records appearing in the first subform and set the control source of the field second to "=n" where n is the count. I guess the trick is know which event to use. Maybe onopen or onformat ?
    Chris

  3. #3
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004

    Talking

    Quote Originally Posted by YZF
    I have two subreports, in both of them there is one field that has control source "=1" and running sum = Yes. So each new line in detail section has number that shows which line it is (first,second,etc,etc).

    The same is in both sub-reports, but second subreport starts from 1 again...is it possible to make it start from where first report ended?

    E.g. First sub-report has 5 lines so last line has number "5" in that field. I want second sub-report to start from number "6" and then 7 , 8 etc...

    Is it possible somehow?


    Thank you
    If both sub-reports are showing different data, why would you want it to pick up the line number from the other? Just trying to satisfy my curiosity. You could probably code it with something like a DMax(YourLineNumber)+1 or something.
    BUD

    BUD

Posting Permissions

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