Results 1 to 7 of 7
  1. #1
    Join Date
    Dec 2003
    Posts
    24

    Lightbulb Running Total - Report - Access 2003

    Hi,
    Iam having trouble adding s.nos to the group header.
    The group header has one or more rows in them. I want to have a s.no incremented only on the group header, ignoring the records it contains.
    I added a textbox and set the control souce to =count([Member]![fName]) and set the running sum to Over group.
    But it starts counting the GH+REC1+REC2+REC3...
    So if first group has 2 records, the next group has s.no. 4?!? i.e GH+REC1+REC2.
    Iam attaching a sample proj for your examination.

    Have a look at the Tables & Quries as well

    Thanks in advance...
    Attached Files Attached Files

  2. #2
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Try =1!

    If you set the control source to =1 and sum Over All, it just might be what you are after?
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  3. #3
    Join Date
    Dec 2003
    Posts
    24
    thankz StarTrekker :thumb:
    coupl of more things..
    How to add ), . (i.e brackets, dot) after the sno. so generated above.
    How to ensure no sno is displayed if there is only one record within the Group city

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    12,350
    mycontrol.text = "(" & avalue & ")"

    personally If it were me I'd probably do the running totals myself in code.. but then I'm a bit of a code junkie (read unreconstructed developer) so alwasy tend to use code rather than them there newfangled things in Access

    to do it in code is relatively trivial
    declare a global variable to carry the totals in the report
    set that variable to zero every time a new group is started
    add one to that variable every time a new detail is formatted
    transfer the value to a control on the group footer in its format event
    Is taking part in the 'Distinguished Gentlemans' ride. Being neither distinguished nor a gentleman, but I am keen to raise funds for Prostrate Cancer research. At present I'm threatening to ride a Norton 961 wearing a kilt. If you would like to contribute to Prostrate Cancer research then please consider donating via this page:-
    http://www.gentlemansride.com/rider/healdem

  5. #5
    Join Date
    Dec 2003
    Posts
    24

    Question

    Thankz healdem,
    but I don't see any Text property in the properties???

  6. #6
    Join Date
    Dec 2003
    Posts
    24

    Lightbulb

    Quote Originally Posted by healdem
    personally If it were me I'd probably do the running totals myself in code.. but then I'm a bit of a code junkie (read unreconstructed developer) so alwasy tend to use code rather than them there newfangled things in Access

    to do it in code is relatively trivial
    declare a global variable to carry the totals in the report
    set that variable to zero every time a new group is started
    add one to that variable every time a new detail is formatted
    transfer the value to a control on the group footer in its format event
    Even I would love to do it that way. But my exposure in VBA pretty low/non existent, not sure how to implement your steps detailed above. A lil code snippet would help.

  7. #7
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    12,350
    Quote Originally Posted by tvdrajkumar
    Thankz healdem,
    but I don't see any Text property in the properties???
    the relevant property may be .value

    if thats not right then I'd suggest you stop the code in debug mode and iterate through the properties fro the relevant item and see what is actually stored in each property, next time round you will be a hardened old pro capable of using what ever property as required
    Is taking part in the 'Distinguished Gentlemans' ride. Being neither distinguished nor a gentleman, but I am keen to raise funds for Prostrate Cancer research. At present I'm threatening to ride a Norton 961 wearing a kilt. If you would like to contribute to Prostrate Cancer research then please consider donating via this page:-
    http://www.gentlemansride.com/rider/healdem

Posting Permissions

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