Why label in group header shows up duplicated on first page (1 Viewer)

got_access:]

Registered User.
Local time
Yesterday, 16:33
Joined
Jun 15, 2018
Messages
83
Hi,
I am new to Access and especially to reports.
I've noticed when creating a report with a group, when I add a label along side the control field which is bound to the group data value, that label appears twice on the reports first page. It is displayed within the group header section and also above it, in the page header.

Also, simply changing this group control field's border from translucent to solid produces the same result. On the first page only, it displays this both within the group header and above within the page header.

I would like to understand why Access is doing this.
Hope I explained so that its understandable.
Thanks!
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 19:33
Joined
Feb 19, 2002
Messages
43,275
Welcome.

Are you sure the fields is not in the design twice? Change something about the control dramatically such as make the text red. Do both control's change?

Can you post a picture of the report in design view and then in print preview please.
 

got_access:]

Registered User.
Local time
Yesterday, 16:33
Joined
Jun 15, 2018
Messages
83
I have a table containing all of Excel’s functions - with their descriptions grouped in their categories. The report is to be a listing of these functions grouped by category.

The attached picture shows 4 screen-shots.
The 1st and top pic shows the result of the default report via the wizard where the report is grouped by category.

Within the page-header section you can see the default labels “Category”, “Function” and “Description”. Under that is the default group header, with the control field that displays “Category”.

The 2nd pic shows the design view – at this point with no alterations.

I remove the three labels within the page header and close-up that section.
Then I move the “Category” control field into the center of its group header section.
Then I locate a label to the right of it with the word “Functions”.
The 3rd pic shows this change in the design view

The 4th pic shows the word “Functions” is printing twice.
But it only does that on the first page.
It appears to be printing within the page header section.
 

Attachments

  • AccessReport.jpg
    AccessReport.jpg
    101.5 KB · Views: 84

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 19:33
Joined
Feb 19, 2002
Messages
43,275
I'm going to guess that you have a null record.

Open the report's recordsource and sort it by category to see the problem record. Fix the form that saves the data to prevent this from happening in the future and delete the existing record.
 

got_access:]

Registered User.
Local time
Yesterday, 16:33
Joined
Jun 15, 2018
Messages
83
Awesome! That was it.
Ok now I'm curious what tipped you off that it would be a blank record in the table?

And I'd really like to know what logic is going on in the report sections to make it do that.

Thanks!!! :-]
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 19:33
Joined
Feb 19, 2002
Messages
43,275
Been there. Done that. Have the scars to prove it:) It doesn't happen to me frequently in my own applications because my forms are pretty tight in what they allow to be saved but I do see it occasionally with apps I manage that were built by others.

The break logic in the report is pretty simple. The category field is null in the first record so the category field is blank and so are the detail fields. In the second record, there is a value so the category header is printed for the second record.

As Mr. Monk says, "it's a curse, and also a blessing." I've been doing this for a very long time and have made a whole lot of mistakes. The good part is I usually remember the solution once I understand what caused the problem.
 

NauticalGent

Ignore List Poster Boy
Local time
Yesterday, 19:33
Joined
Apr 27, 2015
Messages
6,341
The good part is I usually remember the solution once I understand what caused the problem.

For me, the direct opposite applies. And as Billy Joel has said “Things I didn’t know at first, I learned by doing twice”, or three, four...

In all seriousness, I get dismayed and sometimes even discouraged sometimes at how many times I have to retrace my steps. I have even looked into some concepts like the “Memory Palace”, but with marginal results.

Could be all the red wine that seems to be the dietary staple over here...
 

got_access:]

Registered User.
Local time
Yesterday, 16:33
Joined
Jun 15, 2018
Messages
83
Ah! I get it! Yes - I should have thought of that.
Thanks very much for your help! :-]
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 19:33
Joined
Feb 19, 2002
Messages
43,275
You're welcome:)

Sometimes, I don't figure out the source of the problem immediately. Access is smarter than we are and don't ever forget that! One thing that actually stumped me for several years (mostly because it didn't come up often enough to be a huge problem) is that Access rewrites your RecordSource queries for reports and ELIMINATES any field that is not actually bound to a control. So, this only shows up when you have to write code and that code needs to reference a field from the RecordSource that is not bound to a control. What eventually led me to discover that behavior was that one time I wanted to change the sort sequence of the report and I kept changing the query to no effect. Once I realized what was going on, it dawned on me that the same behavior is what had caused past reference problems.
 

Users who are viewing this thread

Top Bottom