If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Access > Running Total - Report - Access 2003

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old
Registered User
 
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
File Type: zip snoDB.zip (32.3 KB, 20 views)
Reply With Quote
  #2 (permalink)  
Old
L33t Helpa Munky
 
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
Reply With Quote
  #3 (permalink)  
Old
Registered User
 
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
Reply With Quote
  #4 (permalink)  
Old
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 12,217
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
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #5 (permalink)  
Old
Registered User
 
Join Date: Dec 2003
Posts: 24
Question

Thankz healdem,
but I don't see any Text property in the properties???
Reply With Quote
  #6 (permalink)  
Old
Registered User
 
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.
Reply With Quote
  #7 (permalink)  
Old
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 12,217
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
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On