Group Running Sum in Textbox

moishy

Registered User.
Local time
Today, 18:31
Joined
Dec 14, 2009
Messages
264
Hide Page header on first page of every group

Hello all experts,

I have a report which is grouped by a field called name. I want to hide the PAGE header on the first page of each group.

I tried a method that I found at http://www.utteraccess.com/forum/Page-Header-Page-Deta-t1966472.html&p=2111636#entry2111636

The problem is that it won't work if the report is filtered and their is only one group.

I remember seeing a suggestion by VbaInet to create a group count using the Running Sum property of a textbox, and Hide the Page Header if the value is 1.

That is what I'm trying now but I don't now how to create a group count using the Running Sum property of a textbox.

All help will be appreciated.
 
Last edited:
That's right moishy. If the group's Force New Page property is set, then the process described will work. Running Sum is a property of a textbox under the Data tab and all you do is set it to 'Over Group' and enter =1 in the textbox's Control Source.
 
Thanks. It works as expected.
 
oops, I spoke too soon...
The page header now is always hidden.
 
Code:
Private Sub Section_PageHeader_Format(Cancel As Integer, FormatCount As Integer)
    
    If Me.txtRunSum = 1 Then
        Me.Section_PageHeader.Visible = False
    ElseIf Me.txtRunSum > 1 Then
        Me.Section_PageHeader.Visible = True
    End If

End Sub
 
I tried it, it doesn't make a difference, the page header is always hidden.
 
Ok.

The db is for a foreign client so data and captions of all controls are not in English. I hope that's ok.

I just had a thought, the report uses a 'dummy' group section using the expression =1. Could that have anything to do with it?

Anyway here's the file.
 
Moishy, I did say that you should put =1 as the Control Source of a textbox. I didn't make mention to you making a group out of it.
 
I created the group before your suggestion. It serves it's own purpose, to have a header on top of the detail section on all pages.

Is their a better way to do that?
 
Last edited:
The textbox needs to be in the Detail section of your report. And you know I don't speak your language so why didn't you write some words in English ;)
 
Sorry about the language if you need I can translate but it will take time.

If the textbox is in the Detail section, it numbers the records and not the groups. For some reason the page header isn't visible on the first and second pages of each group.
 
Last edited:
Hold on a second, what really is your query? You've changed the title of your thread.
 
I changed the title of the thread (for better clarification) before any responses were made.

I have a report which is grouped by a field called name. I want to hide the PAGE header on the first page of each group.

I remember seeing a suggestion to create a group count using the Running Sum property of a textbox, and Hide the Page Header if the value is 1.

In the beginning I didn't know how to do that, now after you explained it, I can't get it to produce the desired results (i.e. hide the PAGE header on the first page of each group).
 
Alright, that's fine but I think your original title was more relevant.

Did you put the =1 textbox in the Detail section of your report? And it's also the detail section where the code should be written. Not the Page Header.
 

Users who are viewing this thread

Back
Top Bottom