Hiding text in Group header

E

EManning

Using A2K. How do I hide text in a group header? I have some text in the
group header that I want to print only on the first page of the new group.
I want it invisible for subsequent pages for the group.

Thanks.
 
D

Duane Hookom

You could try code in the On Format event of the section:

Me.txtYourControl.Visible = Page = Pages

This may require that you have a control in your page header or footer that
is bound to [Page].
 
E

EManning

Thanks for your suggestion. If only one group, then your suggestion works
fine if I change "Page = Pages" to "Page <> Pages", otherwise the text I
want visible on the first page isn't but is visible on subsequent pages. So
it's backwards from what I want.

If multiple groups, then the text remains visible on all pages except for
the very last page.

I had a text box bound to [Pages] and added a bound text box to [Page] per
your suggestion.



Duane Hookom said:
You could try code in the On Format event of the section:

Me.txtYourControl.Visible = Page = Pages

This may require that you have a control in your page header or footer that
is bound to [Page].

--
Duane Hookom
MS Access MVP


EManning said:
Using A2K. How do I hide text in a group header? I have some text in the
group header that I want to print only on the first page of the new group.
I want it invisible for subsequent pages for the group.

Thanks.
 
F

fredg

Thanks for your suggestion. If only one group, then your suggestion works
fine if I change "Page = Pages" to "Page <> Pages", otherwise the text I
want visible on the first page isn't but is visible on subsequent pages. So
it's backwards from what I want.

If multiple groups, then the text remains visible on all pages except for
the very last page.

I had a text box bound to [Pages] and added a bound text box to [Page] per
your suggestion.

Duane Hookom said:
You could try code in the On Format event of the section:

Me.txtYourControl.Visible = Page = Pages

This may require that you have a control in your page header or footer that
is bound to [Page].

--
Duane Hookom
MS Access MVP


EManning said:
Using A2K. How do I hide text in a group header? I have some text in the
group header that I want to print only on the first page of the new group.
I want it invisible for subsequent pages for the group.

Thanks.

See if this method works in your situation.
Dim a variable up in the declaration section of that report's code
sheet:
Option Explicit
Dim intGroupStart as Integer.

Code the Group Header Format event:
ControlName.Visible = intGroupStart = 0

Code the Group Header Print Event:
intGroupStart = 0

Add (if you don't already have one) a Group Footer.
Code the Group Footer Print Event:
intGroupStart = 0
 
F

fredg

Thanks for your suggestion. If only one group, then your suggestion works
fine if I change "Page = Pages" to "Page <> Pages", otherwise the text I
want visible on the first page isn't but is visible on subsequent pages. So
it's backwards from what I want.

If multiple groups, then the text remains visible on all pages except for
the very last page.

I had a text box bound to [Pages] and added a bound text box to [Page] per
your suggestion.

Duane Hookom said:
You could try code in the On Format event of the section:

Me.txtYourControl.Visible = Page = Pages

This may require that you have a control in your page header or footer that
is bound to [Page].

--
Duane Hookom
MS Access MVP


Using A2K. How do I hide text in a group header? I have some text in the
group header that I want to print only on the first page of the new group.
I want it invisible for subsequent pages for the group.

Thanks.

See if this method works in your situation.
Dim a variable up in the declaration section of that report's code
sheet:
Option Explicit
Dim intGroupStart as Integer.

Code the Group Header Format event:
ControlName.Visible = intGroupStart = 0

Code the Group Header Print Event:
intGroupStart = 0

Add (if you don't already have one) a Group Footer.
Code the Group Footer Print Event:
intGroupStart = 0

I goofed. I meant to write:

Code the Group Header Print Event:
intGroupStart = 1
 
E

EManning

Thanks. That did it.


fredg said:
Thanks for your suggestion. If only one group, then your suggestion works
fine if I change "Page = Pages" to "Page <> Pages", otherwise the text I
want visible on the first page isn't but is visible on subsequent pages. So
it's backwards from what I want.

If multiple groups, then the text remains visible on all pages except for
the very last page.

I had a text box bound to [Pages] and added a bound text box to [Page] per
your suggestion.

You could try code in the On Format event of the section:

Me.txtYourControl.Visible = Page = Pages

This may require that you have a control in your page header or footer
that
is bound to [Page].

--
Duane Hookom
MS Access MVP


Using A2K. How do I hide text in a group header? I have some text in
the
group header that I want to print only on the first page of the new
group.
I want it invisible for subsequent pages for the group.

Thanks.

See if this method works in your situation.
Dim a variable up in the declaration section of that report's code
sheet:
Option Explicit
Dim intGroupStart as Integer.

Code the Group Header Format event:
ControlName.Visible = intGroupStart = 0

Code the Group Header Print Event:
intGroupStart = 0

Add (if you don't already have one) a Group Footer.
Code the Group Footer Print Event:
intGroupStart = 0

I goofed. I meant to write:

Code the Group Header Print Event:
intGroupStart = 1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top