Print to Header, Not Detail

  • Thread starter Thread starter bw
  • Start date Start date
B

bw

I'd like to print the first record of a group to the Page or Group header,
but not print that record again in the detail section.

How's it done?
Thanks,
Bernie
 
I'd like to print the first record of a group to the Page or Group header,
but not print that record again in the detail section.

How's it done?
Thanks,
Bernie

Place your controls in the Page header.

Add an unbound control to the detail section.
Name it Show.
You can make it not visible.

Code the Page Header Format event:
Me![Show] = 1

Code the Detail Format event:
Cancel = Me![Show] = 1
Me![Show] = 2

That should do it for you.
 
Thanks for the reply, Fred
I'm getting an error:
"Microsoft Access can't find the macro 'Me![Show]=1."

I'm not sure were, or how you wanted me to enter your code. I have the
following procedure, which is producing the error:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Cancel = Me![Show] = 1
Me![Show] = 2
End Sub

Can you please explain in further detail?
Thanks,
Bernie


fredg said:
I'd like to print the first record of a group to the Page or Group
header,
but not print that record again in the detail section.

How's it done?
Thanks,
Bernie

Place your controls in the Page header.

Add an unbound control to the detail section.
Name it Show.
You can make it not visible.

Code the Page Header Format event:
Me![Show] = 1

Code the Detail Format event:
Cancel = Me![Show] = 1
Me![Show] = 2

That should do it for you.
 
Thanks for the reply, Fred
I'm getting an error:
"Microsoft Access can't find the macro 'Me![Show]=1."

I'm not sure were, or how you wanted me to enter your code. I have the
following procedure, which is producing the error:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Cancel = Me![Show] = 1
Me![Show] = 2
End Sub

Can you please explain in further detail?
Thanks,
Bernie

fredg said:
I'd like to print the first record of a group to the Page or Group
header,
but not print that record again in the detail section.

How's it done?
Thanks,
Bernie

Place your controls in the Page header.

Add an unbound control to the detail section.
Name it Show.
You can make it not visible.

Code the Page Header Format event:
Me![Show] = 1

Code the Detail Format event:
Cancel = Me![Show] = 1
Me![Show] = 2

That should do it for you.

Did you add an unbound control to the Detail section of your report?
Did you name it "Show", as I wrote in my first reply?
 
fredg said:
Thanks for the reply, Fred
I'm getting an error:
"Microsoft Access can't find the macro 'Me![Show]=1."

I'm not sure were, or how you wanted me to enter your code. I have the
following procedure, which is producing the error:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Cancel = Me![Show] = 1
Me![Show] = 2
End Sub

Can you please explain in further detail?
Thanks,
Bernie

fredg said:
On Wed, 23 Nov 2005 17:47:35 -0700, bw wrote:

I'd like to print the first record of a group to the Page or Group
header,
but not print that record again in the detail section.

How's it done?
Thanks,
Bernie

Place your controls in the Page header.

Add an unbound control to the detail section.
Name it Show.
You can make it not visible.

Code the Page Header Format event:
Me![Show] = 1

Code the Detail Format event:
Cancel = Me![Show] = 1
Me![Show] = 2

That should do it for you.

Did you add an unbound control to the Detail section of your report?
Did you name it "Show", as I wrote in my first reply?

Yes sir, I did.
Specifics of that control are:
Name=Show
Control Source= <empty>
Visible=No
It is located in the Detail Section.

I could be missing something that is obvious, so don't be afraid to let me
know.
Bernie
 
fredg said:
Thanks for the reply, Fred
I'm getting an error:
"Microsoft Access can't find the macro 'Me![Show]=1."

I'm not sure were, or how you wanted me to enter your code. I have the
following procedure, which is producing the error:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Cancel = Me![Show] = 1
Me![Show] = 2
End Sub

Can you please explain in further detail?
Thanks,
Bernie

On Wed, 23 Nov 2005 17:47:35 -0700, bw wrote:

I'd like to print the first record of a group to the Page or Group
header,
but not print that record again in the detail section.

How's it done?
Thanks,
Bernie

Place your controls in the Page header.

Add an unbound control to the detail section.
Name it Show.
You can make it not visible.

Code the Page Header Format event:
Me![Show] = 1

Code the Detail Format event:
Cancel = Me![Show] = 1
Me![Show] = 2

That should do it for you.

Did you add an unbound control to the Detail section of your report?
Did you name it "Show", as I wrote in my first reply?
Add an unbound control to the detail section.
Name it Show.
You can make it not visible.

Yes sir, I did.
Specifics of that control are:
Name=Show
Control Source= <empty>
Visible=No
It is located in the Detail Section.

I could be missing something that is obvious, so don't be afraid to let me
know.
Bernie


Are you sure it's the Detail Format code and not the Page Header
format code causing that error?

Did you write the
Me![Show]=1
in the code window or directly on the Page Header On Format event
line?
It belongs in the code not on the line, i.e. the On Format event line
should read [Event Procedure].

The actual Page Format event code should read:

Private Sub PageHeader_Format(Cancel As Integer, FormatCount As
Integer)
Me!Show = 1
End Sub

Other than that, I have no idea why you're getting that error message.
My test report works fine.
 
Fred,
It works now. Thanks much for your help.
Bernie


fredg said:
fredg said:
On Thu, 24 Nov 2005 14:12:01 -0700, bw wrote:

Thanks for the reply, Fred
I'm getting an error:
"Microsoft Access can't find the macro 'Me![Show]=1."

I'm not sure were, or how you wanted me to enter your code. I have the
following procedure, which is producing the error:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Cancel = Me![Show] = 1
Me![Show] = 2
End Sub

Can you please explain in further detail?
Thanks,
Bernie

On Wed, 23 Nov 2005 17:47:35 -0700, bw wrote:

I'd like to print the first record of a group to the Page or Group
header,
but not print that record again in the detail section.

How's it done?
Thanks,
Bernie

Place your controls in the Page header.

Add an unbound control to the detail section.
Name it Show.
You can make it not visible.

Code the Page Header Format event:
Me![Show] = 1

Code the Detail Format event:
Cancel = Me![Show] = 1
Me![Show] = 2

That should do it for you.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail

Did you add an unbound control to the Detail section of your report?
Did you name it "Show", as I wrote in my first reply?

Add an unbound control to the detail section.
Name it Show.
You can make it not visible.

Yes sir, I did.
Specifics of that control are:
Name=Show
Control Source= <empty>
Visible=No
It is located in the Detail Section.

I could be missing something that is obvious, so don't be afraid to let
me
know.
Bernie


Are you sure it's the Detail Format code and not the Page Header
format code causing that error?

Did you write the
Me![Show]=1
in the code window or directly on the Page Header On Format event
line?
It belongs in the code not on the line, i.e. the On Format event line
should read [Event Procedure].

The actual Page Format event code should read:

Private Sub PageHeader_Format(Cancel As Integer, FormatCount As
Integer)
Me!Show = 1
End Sub

Other than that, I have no idea why you're getting that error message.
My test report works fine.
 
Back
Top