Numbering

N

New_User

Hello,
I have a report with multiple records in it. I have already grouped the
report by full_name and forced a new page after this section. What I would
like to do is print the entire report, which can be 300 pages, with the
number of pages to reflect only the pages of that record. Right now I'm using
="Page " & [Page] & " of " & [Pages] so the page numbers will say for
example 1 of 299. Is there any way to somehow reset the count after each
record?

Thank you very much.
 
F

fredg

Hello,
I have a report with multiple records in it. I have already grouped the
report by full_name and forced a new page after this section. What I would
like to do is print the entire report, which can be 300 pages, with the
number of pages to reflect only the pages of that record. Right now I'm using
="Page " & [Page] & " of " & [Pages] so the page numbers will say for
example 1 of 299. Is there any way to somehow reset the count after each
record?

Thank you very much.

See:
"Printing First and Last Page Numbers for Report Groups "
http://www.mvps.org/access/reports/rpt0013.htm

Things to make sure of:

1) Add an unbound control to the Page Footer.
Name this control "ctlGrpPages"

2) Paste the code into the Page Footer Format event.

3) In the code, change Me!Salesman to
Me![Name of the control used to group by]
 
N

New_User

Thank you for your help Fred. I have followed the first two steps you
suggested however, I don't know which code you speak of in step 3. I am a
relatively new user with a very basic knowledge of access. Can you please
give me more detailed or simplified directions.
Thank you.

fredg said:
Hello,
I have a report with multiple records in it. I have already grouped the
report by full_name and forced a new page after this section. What I would
like to do is print the entire report, which can be 300 pages, with the
number of pages to reflect only the pages of that record. Right now I'm using
="Page " & [Page] & " of " & [Pages] so the page numbers will say for
example 1 of 299. Is there any way to somehow reset the count after each
record?

Thank you very much.

See:
"Printing First and Last Page Numbers for Report Groups "
http://www.mvps.org/access/reports/rpt0013.htm

Things to make sure of:

1) Add an unbound control to the Page Footer.
Name this control "ctlGrpPages"

2) Paste the code into the Page Footer Format event.

3) In the code, change Me!Salesman to
Me![Name of the control used to group by]
 
F

fredg

Thank you for your help Fred. I have followed the first two steps you
suggested however, I don't know which code you speak of in step 3. I am a
relatively new user with a very basic knowledge of access. Can you please
give me more detailed or simplified directions.
Thank you.

fredg said:
Hello,
I have a report with multiple records in it. I have already grouped the
report by full_name and forced a new page after this section. What I would
like to do is print the entire report, which can be 300 pages, with the
number of pages to reflect only the pages of that record. Right now I'm using
="Page " & [Page] & " of " & [Pages] so the page numbers will say for
example 1 of 299. Is there any way to somehow reset the count after each
record?

Thank you very much.

See:
"Printing First and Last Page Numbers for Report Groups "
http://www.mvps.org/access/reports/rpt0013.htm

Things to make sure of:

1) Add an unbound control to the Page Footer.
Name this control "ctlGrpPages"

2) Paste the code into the Page Footer Format event.

3) In the code, change Me!Salesman to
Me![Name of the control used to group by]

#3 refers to the code you just copied and pasted into the report
module's Page Footer Format event.
If you read the code you will come across a line that says:
GrpNameCurrent = Me!Salesman

Change Me!Salesman to Me!Whatever your group name is
 
N

New_User

Ok, I understood your explaination and I have completed the steps. When I
view the report in print preview, the box is blank. In design view i can see
the box but there must be no results, because nothing is there is print view.
I have checked the visible property for the text box and it is visible. I
appreciate your help.
Virna

fredg said:
Thank you for your help Fred. I have followed the first two steps you
suggested however, I don't know which code you speak of in step 3. I am a
relatively new user with a very basic knowledge of access. Can you please
give me more detailed or simplified directions.
Thank you.

fredg said:
On Tue, 25 Nov 2008 07:18:29 -0800, New_User wrote:

Hello,
I have a report with multiple records in it. I have already grouped the
report by full_name and forced a new page after this section. What I would
like to do is print the entire report, which can be 300 pages, with the
number of pages to reflect only the pages of that record. Right now I'm using
="Page " & [Page] & " of " & [Pages] so the page numbers will say for
example 1 of 299. Is there any way to somehow reset the count after each
record?

Thank you very much.

See:
"Printing First and Last Page Numbers for Report Groups "
http://www.mvps.org/access/reports/rpt0013.htm

Things to make sure of:

1) Add an unbound control to the Page Footer.
Name this control "ctlGrpPages"

2) Paste the code into the Page Footer Format event.

3) In the code, change Me!Salesman to
Me![Name of the control used to group by]

#3 refers to the code you just copied and pasted into the report
module's Page Footer Format event.
If you read the code you will come across a line that says:
GrpNameCurrent = Me!Salesman

Change Me!Salesman to Me!Whatever your group name is
 
F

fredg

Ok, I understood your explaination and I have completed the steps. When I
view the report in print preview, the box is blank. In design view i can see
the box but there must be no results, because nothing is there is print view.
I have checked the visible property for the text box and it is visible. I
appreciate your help.
Virna

fredg said:
Thank you for your help Fred. I have followed the first two steps you
suggested however, I don't know which code you speak of in step 3. I am a
relatively new user with a very basic knowledge of access. Can you please
give me more detailed or simplified directions.
Thank you.

:

On Tue, 25 Nov 2008 07:18:29 -0800, New_User wrote:

Hello,
I have a report with multiple records in it. I have already grouped the
report by full_name and forced a new page after this section. What I would
like to do is print the entire report, which can be 300 pages, with the
number of pages to reflect only the pages of that record. Right now I'm using
="Page " & [Page] & " of " & [Pages] so the page numbers will say for
example 1 of 299. Is there any way to somehow reset the count after each
record?

Thank you very much.

See:
"Printing First and Last Page Numbers for Report Groups "
http://www.mvps.org/access/reports/rpt0013.htm

Things to make sure of:

1) Add an unbound control to the Page Footer.
Name this control "ctlGrpPages"

2) Paste the code into the Page Footer Format event.

3) In the code, change Me!Salesman to
Me![Name of the control used to group by]

#3 refers to the code you just copied and pasted into the report
module's Page Footer Format event.
If you read the code you will come across a line that says:
GrpNameCurrent = Me!Salesman

Change Me!Salesman to Me!Whatever your group name is

Open the report in Design View.
Display the property sheet for the Page Footer.
Click on the Events tab.

On the line that says Format it should read [Event Procedure].
If it does, click on the little button with the 3 dots that appears on
that line.
Please copy the exact code you have in the event, including the first
and last lines of the procedure.

Paste that code into a reply post so I can see what it is you actually
have done.
Let me know what the name of the control is that you are grouping on.

If you do not have [Event Procedure] on that Format line, then please
delete whatever it is you do have on that line, and write [Event
Proceure].
Then click on the button with the 3 dots that appears on that line.
When the code window opens, the cursor will be flashing between 2
already existing lines of code. Between those 2 lines paste the code
you copied from that web site.
Change Me!Salesman to Me![Whatever control you are grouping on].

Make sure you have just one
Private Sub PageFooter_Format(Cancel As Integer, FormatCount As
Integer) line (delete the pasted line and retain the original line)
and just one End Sub line

Run the report now and see if it works.
 
N

New_User

It did say Event Procedure, here is the code. The name of the group that I am
grouping on is full_name

Private Sub PageFooterSection_Format(Cancel As Integer, FormatCount As
Integer)
Dim i As Integer
If Me.Pages = 0 Then
ReDim Preserve GrpArrayPage(Me.Page + 1)
ReDim Preserve GrpArrayPages(Me.Page + 1)
GrpNameCurrent = Me!full_name
If GrpNameCurrent = GrpNamePrevious Then
GrpArrayPage(Me.Page) = GrpArrayPage(Me.Page - 1) + 1
GrpPages = GrpArrayPage(Me.Page)
For i = Me.Page - ((GrpPages) - 1) To Me.Page
GrpArrayPages(i) = GrpPages
Next i
Else
GrpPage = 1
GrpArrayPage(Me.Page) = GrpPage
GrpArrayPages(Me.Page) = GrpPage
End If
Else
Me!ctlGrpPages = "Group Page " & GrpArrayPage(Me.Page) & " of " &
GrpArrayPages(Me.Page)
End If
GrpNamePrevious = GrpNameCurrent
End Sub

fredg said:
Ok, I understood your explaination and I have completed the steps. When I
view the report in print preview, the box is blank. In design view i can see
the box but there must be no results, because nothing is there is print view.
I have checked the visible property for the text box and it is visible. I
appreciate your help.
Virna

fredg said:
On Tue, 25 Nov 2008 07:59:01 -0800, New_User wrote:

Thank you for your help Fred. I have followed the first two steps you
suggested however, I don't know which code you speak of in step 3. I am a
relatively new user with a very basic knowledge of access. Can you please
give me more detailed or simplified directions.
Thank you.

:

On Tue, 25 Nov 2008 07:18:29 -0800, New_User wrote:

Hello,
I have a report with multiple records in it. I have already grouped the
report by full_name and forced a new page after this section. What I would
like to do is print the entire report, which can be 300 pages, with the
number of pages to reflect only the pages of that record. Right now I'm using
="Page " & [Page] & " of " & [Pages] so the page numbers will say for
example 1 of 299. Is there any way to somehow reset the count after each
record?

Thank you very much.

See:
"Printing First and Last Page Numbers for Report Groups "
http://www.mvps.org/access/reports/rpt0013.htm

Things to make sure of:

1) Add an unbound control to the Page Footer.
Name this control "ctlGrpPages"

2) Paste the code into the Page Footer Format event.

3) In the code, change Me!Salesman to
Me![Name of the control used to group by]
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail


#3 refers to the code you just copied and pasted into the report
module's Page Footer Format event.
If you read the code you will come across a line that says:
GrpNameCurrent = Me!Salesman

Change Me!Salesman to Me!Whatever your group name is

Open the report in Design View.
Display the property sheet for the Page Footer.
Click on the Events tab.

On the line that says Format it should read [Event Procedure].
If it does, click on the little button with the 3 dots that appears on
that line.
Please copy the exact code you have in the event, including the first
and last lines of the procedure.

Paste that code into a reply post so I can see what it is you actually
have done.
Let me know what the name of the control is that you are grouping on.

If you do not have [Event Procedure] on that Format line, then please
delete whatever it is you do have on that line, and write [Event
Proceure].
Then click on the button with the 3 dots that appears on that line.
When the code window opens, the cursor will be flashing between 2
already existing lines of code. Between those 2 lines paste the code
you copied from that web site.
Change Me!Salesman to Me![Whatever control you are grouping on].

Make sure you have just one
Private Sub PageFooter_Format(Cancel As Integer, FormatCount As
Integer) line (delete the pasted line and retain the original line)
and just one End Sub line

Run the report now and see if it works.
 
F

fredg

It did say Event Procedure, here is the code. The name of the group that I am
grouping on is full_name

Private Sub PageFooterSection_Format(Cancel As Integer, FormatCount As
Integer)
Dim i As Integer
If Me.Pages = 0 Then
ReDim Preserve GrpArrayPage(Me.Page + 1)
ReDim Preserve GrpArrayPages(Me.Page + 1)
GrpNameCurrent = Me!full_name
If GrpNameCurrent = GrpNamePrevious Then
GrpArrayPage(Me.Page) = GrpArrayPage(Me.Page - 1) + 1
GrpPages = GrpArrayPage(Me.Page)
For i = Me.Page - ((GrpPages) - 1) To Me.Page
GrpArrayPages(i) = GrpPages
Next i
Else
GrpPage = 1
GrpArrayPage(Me.Page) = GrpPage
GrpArrayPages(Me.Page) = GrpPage
End If
Else
Me!ctlGrpPages = "Group Page " & GrpArrayPage(Me.Page) & " of " &
GrpArrayPages(Me.Page)
End If
GrpNamePrevious = GrpNameCurrent
End Sub

fredg said:
Ok, I understood your explaination and I have completed the steps. When I
view the report in print preview, the box is blank. In design view i can see
the box but there must be no results, because nothing is there is print view.
I have checked the visible property for the text box and it is visible. I
appreciate your help.
Virna

:

On Tue, 25 Nov 2008 07:59:01 -0800, New_User wrote:

Thank you for your help Fred. I have followed the first two steps you
suggested however, I don't know which code you speak of in step 3. I am a
relatively new user with a very basic knowledge of access. Can you please
give me more detailed or simplified directions.
Thank you.

:

On Tue, 25 Nov 2008 07:18:29 -0800, New_User wrote:

Hello,
I have a report with multiple records in it. I have already grouped the
report by full_name and forced a new page after this section. What I would
like to do is print the entire report, which can be 300 pages, with the
number of pages to reflect only the pages of that record. Right now I'm using
="Page " & [Page] & " of " & [Pages] so the page numbers will say for
example 1 of 299. Is there any way to somehow reset the count after each
record?

Thank you very much.

See:
"Printing First and Last Page Numbers for Report Groups "
http://www.mvps.org/access/reports/rpt0013.htm

Things to make sure of:

1) Add an unbound control to the Page Footer.
Name this control "ctlGrpPages"

2) Paste the code into the Page Footer Format event.

3) In the code, change Me!Salesman to
Me![Name of the control used to group by]
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail


#3 refers to the code you just copied and pasted into the report
module's Page Footer Format event.
If you read the code you will come across a line that says:
GrpNameCurrent = Me!Salesman

Change Me!Salesman to Me!Whatever your group name is

Open the report in Design View.
Display the property sheet for the Page Footer.
Click on the Events tab.

On the line that says Format it should read [Event Procedure].
If it does, click on the little button with the 3 dots that appears on
that line.
Please copy the exact code you have in the event, including the first
and last lines of the procedure.

Paste that code into a reply post so I can see what it is you actually
have done.
Let me know what the name of the control is that you are grouping on.

If you do not have [Event Procedure] on that Format line, then please
delete whatever it is you do have on that line, and write [Event
Proceure].
Then click on the button with the 3 dots that appears on that line.
When the code window opens, the cursor will be flashing between 2
already existing lines of code. Between those 2 lines paste the code
you copied from that web site.
Change Me!Salesman to Me![Whatever control you are grouping on].

Make sure you have just one
Private Sub PageFooter_Format(Cancel As Integer, FormatCount As
Integer) line (delete the pasted line and retain the original line)
and just one End Sub line

Run the report now and see if it works.

Are you sure the actual name of the group is exactly "full_name" (with
the underscore) and not "full name" (with the space)?
Access VBA will throw an underscore if you enter a field name with a
space without enclosing it in brackets, i.e. [full name].
Try
GrpNameCurrent = Me![full name]

If that is not the problem then I can't help you further without
seeing the database. I know the code works.
 

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