On Group Level-How Many TPAs

  • Thread starter Thread starter Bonnie
  • Start date Start date
B

Bonnie

Using A02. I have a report that groups on TPA ID and lists
all of their contracts. There are 36 TPAs with a total of
845 contracts mixed out among them. I have a contract
total in the TPA footer as well as the report footer. BUT,
when I try to count TPAs, I get 845!

In the query, the TPA is listed in each contract record so
yes, there are 845 records with a TPA field, but...

I remember reading about creating a dummy grouping level
but cannot find anything on it. Could someone shine the
light into this corner for me?

Thanks in advance for any help or advice. I apologize for
my ignorance on this.
 
Bonnie said:
Using A02. I have a report that groups on TPA ID and lists
all of their contracts. There are 36 TPAs with a total of
845 contracts mixed out among them. I have a contract
total in the TPA footer as well as the report footer. BUT,
when I try to count TPAs, I get 845!

In the query, the TPA is listed in each contract record so
yes, there are 845 records with a TPA field, but...

I remember reading about creating a dummy grouping level
but cannot find anything on it. Could someone shine the
light into this corner for me?


Right. use a text box named txtTPScount in the TPA group
header or footer section. Set its controlsource expression
to =1 and RunningSum property to Over All. Then you can
display the number of different TPAs by using =txtTPScount
in a text box in the report footer.
 
"Did you get that memo? Ah..yeah, it's just we're putting new coversheets on
all the TPA reports before they go out. That would be great."
from Lumberg in the movie "Office Space"
 
Marshall, thank you VERY much, it worked GREAT!
However...I like to put my total on the rpt header rather
than, or in addition to, the footer. I placed a text box
on the rpt footer, named it txtGT, put =txtTPACount in
control source. It works!!! Then, I put a text box in the
rpt header and put =txtGT in control source. It gives me a
1. Shouldn't it just be another window to see txtTPACount?
I understand the running count must be involved and I'm
counting at the beginning, etc. Just wondering if there's
an easy way to show the total on the rpt header and footer.

Thanks in advance for all the help!!!
 
Bonnie said:
Marshall, thank you VERY much, it worked GREAT!
However...I like to put my total on the rpt header rather
than, or in addition to, the footer. I placed a text box
on the rpt footer, named it txtGT, put =txtTPACount in
control source. It works!!! Then, I put a text box in the
rpt header and put =txtGT in control source. It gives me a
1. Shouldn't it just be another window to see txtTPACount?
I understand the running count must be involved and I'm
counting at the beginning, etc. Just wondering if there's
an easy way to show the total on the rpt header and footer.


In a "normal" situation, the Running Sum approach can not do
that, the calculation has not been completed when the repot
header is processed.

However you can make the report process everthing twice by
using a text box that refers to Pages (e.g. page footer text
box with expression = Page & " of " & Pages). This will
force Access to format the entire report to figure out how
many pages there are, then it has to go back to the
beginning and format the report again, this time filling in
the value of Pages.

You can take advantage of this by using a little code in
the report:

Private intTPAcount As Integer

Private Sub ReportFooter_Format( . . .
intTPAcount = txtGT
End Sub

Private Sub ReportHeader_Print( . . .
txtHdrGT = intTPAcount
End Sub

This saves the total from the report footer the first time
Access goes through the report and copies it to the total in
the header the second time through.
 
Back
Top