Access Report - need next record function for fields on same repor

C

CHAD GRAYBILL

Help, think I got way in over my head in this project. I had info in old dos
database time to bring it into the new century imported in Access.
I have created a new report in access for Volunteer Fire Company fundrive.
My problem is I have a preprinted form on 8 1/2 X 11" that is split into 3
equal sections, with same preprinted info in each of the 3 slips on the form.
The problem is there is a default min. for top margins, which is linked to
printer driver & cannot be changed. So, my first record prints fine, but the
2nd & 3rd slips print off the preprinted boxes.

I was told to make the report fit on the whole page (made it longer). but
now, how do I get the 2nd & 3rd slips to go to the next records? I know in MS
Word just insert <next record> before the fields & it works fine, not in
Acess it does not.

Does this require alot of custom vb stuff? Below is a sample of fields &
text I have on the report for top slip, need it to go to next record for 2nd
& 3rd.

Thanks in advance
Chad Graybill
(e-mail address removed)

**********************************************
Circle which amount donated $30.00 $40.00 $50.00

[LAST2]
=Trim([FIRST] & " " & [MI] & " " & [LAST])
="OR CURRENT RESIDENT"
=[ST_ADDRESS] & [AFFIX] & " " & [RD_DIRECT] & " " & [RD_ADDRESS]
=[CITY] & ", " & [STATE] & " " & [ZIP]
*******************************************************
 
A

Allen Browne

You want 3 labels on a Letter-sized page, with the text placed exactly the
same on each. But you must allow for half-inch margin top and bottom of the
page. The solution is to create a group footer that prints every record, and
suppress it on the 3rd label.

1. Open (or create) the report in design view.
Choose Page Setup from the File menu, and set the top and bottom margins to
0.5 inch.

2. Set the Height of the Detail section to 2.666 inch. The actual
calculation for this is:
the page height, less page header height, less page footer height, less 2
times the spacer height, and divide the result by 3 labels:
(PageHeight - (PageHeader + PageFooter + 2 x Spacer)) / 3

3. Add a text box to the Detail section, and give it these properties:
Control Source =1
Running Sum Over All
Name txtCount
Format General Number
Visible No

4. Open the Sorting And Grouping dialog (View menu).
Select your primary key field.
In the lower pane of the dialog, set Group Footer to Yes.
Set the Height of this section to 1.0 inch. (This is the height of the page
header, plus the height of the page footer.)

5. To suppress this group footer for the 3rd label on the page, set the On
Format property of this group footer section to:
Event Procedure
Click the Build button (...) beside this.
Access opens the code window.
Add this line between the "Private Sub ..." and "End Sub" lines:

Private Sub GroupFooter0_Format(Cancel As Integer, FormatCount As Integer)
Me.GroupFooter0.Visible = (((Me.txtCount - 1) Mod 3) <> 2)
End Sub


In the end, your 11" tall page looks like this:

,------------------------------------
| 0.5" Page Header
|---------------------------
|
|
| 2.666" Label 1
|
|
|-----------------
| 1.0" Group Footer (Spacer)
|
|--------------------------
|
|
| 2.666" Label 2
|
|
|-----------------
| 1.0" Group Footer (Spacer)
|
|---------------------------
|
|
| 2.666" Label 3
|
|
|-------------------------- (suppressed group footer is zero height here)
| 0.5" Page Footer
`--------------------------------------

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

CHAD GRAYBILL said:
Help, think I got way in over my head in this project. I had info in old
dos
database time to bring it into the new century imported in Access.
I have created a new report in access for Volunteer Fire Company fundrive.
My problem is I have a preprinted form on 8 1/2 X 11" that is split into 3
equal sections, with same preprinted info in each of the 3 slips on the
form.
The problem is there is a default min. for top margins, which is linked to
printer driver & cannot be changed. So, my first record prints fine, but
the
2nd & 3rd slips print off the preprinted boxes.

I was told to make the report fit on the whole page (made it longer). but
now, how do I get the 2nd & 3rd slips to go to the next records? I know in
MS
Word just insert <next record> before the fields & it works fine, not in
Acess it does not.

Does this require alot of custom vb stuff? Below is a sample of fields &
text I have on the report for top slip, need it to go to next record for
2nd
& 3rd.

Thanks in advance
Chad Graybill
(e-mail address removed)

**********************************************
Circle which amount donated $30.00 $40.00 $50.00

[LAST2]
=Trim([FIRST] & " " & [MI] & " " & [LAST])
="OR CURRENT RESIDENT"
=[ST_ADDRESS] & [AFFIX] & " " & [RD_DIRECT] & " " & [RD_ADDRESS]
=[CITY] & ", " & [STATE] & " " & [ZIP]
*******************************************************
 
C

CHAD GRAYBILL

I did everything verbatim from your instruction. I preview the report & get:
"Enter Parameter Value 1" then box to enter a value?
Thanks, Chad

Allen Browne said:
You want 3 labels on a Letter-sized page, with the text placed exactly the
same on each. But you must allow for half-inch margin top and bottom of the
page. The solution is to create a group footer that prints every record, and
suppress it on the 3rd label.

1. Open (or create) the report in design view.
Choose Page Setup from the File menu, and set the top and bottom margins to
0.5 inch.

2. Set the Height of the Detail section to 2.666 inch. The actual
calculation for this is:
the page height, less page header height, less page footer height, less 2
times the spacer height, and divide the result by 3 labels:
(PageHeight - (PageHeader + PageFooter + 2 x Spacer)) / 3

3. Add a text box to the Detail section, and give it these properties:
Control Source =1
Running Sum Over All
Name txtCount
Format General Number
Visible No

4. Open the Sorting And Grouping dialog (View menu).
Select your primary key field.
In the lower pane of the dialog, set Group Footer to Yes.
Set the Height of this section to 1.0 inch. (This is the height of the page
header, plus the height of the page footer.)

5. To suppress this group footer for the 3rd label on the page, set the On
Format property of this group footer section to:
Event Procedure
Click the Build button (...) beside this.
Access opens the code window.
Add this line between the "Private Sub ..." and "End Sub" lines:

Private Sub GroupFooter0_Format(Cancel As Integer, FormatCount As Integer)
Me.GroupFooter0.Visible = (((Me.txtCount - 1) Mod 3) <> 2)
End Sub


In the end, your 11" tall page looks like this:

,------------------------------------
| 0.5" Page Header
|---------------------------
|
|
| 2.666" Label 1
|
|
|-----------------
| 1.0" Group Footer (Spacer)
|
|--------------------------
|
|
| 2.666" Label 2
|
|
|-----------------
| 1.0" Group Footer (Spacer)
|
|---------------------------
|
|
| 2.666" Label 3
|
|
|-------------------------- (suppressed group footer is zero height here)
| 0.5" Page Footer
`--------------------------------------

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

CHAD GRAYBILL said:
Help, think I got way in over my head in this project. I had info in old
dos
database time to bring it into the new century imported in Access.
I have created a new report in access for Volunteer Fire Company fundrive.
My problem is I have a preprinted form on 8 1/2 X 11" that is split into 3
equal sections, with same preprinted info in each of the 3 slips on the
form.
The problem is there is a default min. for top margins, which is linked to
printer driver & cannot be changed. So, my first record prints fine, but
the
2nd & 3rd slips print off the preprinted boxes.

I was told to make the report fit on the whole page (made it longer). but
now, how do I get the 2nd & 3rd slips to go to the next records? I know in
MS
Word just insert <next record> before the fields & it works fine, not in
Acess it does not.

Does this require alot of custom vb stuff? Below is a sample of fields &
text I have on the report for top slip, need it to go to next record for
2nd
& 3rd.

Thanks in advance
Chad Graybill
(e-mail address removed)

**********************************************
Circle which amount donated $30.00 $40.00 $50.00

[LAST2]
=Trim([FIRST] & " " & [MI] & " " & [LAST])
="OR CURRENT RESIDENT"
=[ST_ADDRESS] & [AFFIX] & " " & [RD_DIRECT] & " " & [RD_ADDRESS]
=[CITY] & ", " & [STATE] & " " & [ZIP]
*******************************************************
 
A

Allen Browne

If Access asks for a parameter value, it means there is some name that
Access does not recognise as a valid field name.

It could be in the RecordSource (or the query that feeds the report), in the
Control Source of a text box, in the Sorting and Grouping dialog, or in the
Filter or OrderBy properties of the report.

Someone else asked for this also this week, so this is now a web page at:
http://members.iinet.net.au/~allenbrowne/ser-54.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

CHAD GRAYBILL said:
I did everything verbatim from your instruction. I preview the report &
get:
"Enter Parameter Value 1" then box to enter a value?
Thanks, Chad

Allen Browne said:
You want 3 labels on a Letter-sized page, with the text placed exactly
the
same on each. But you must allow for half-inch margin top and bottom of
the
page. The solution is to create a group footer that prints every record,
and
suppress it on the 3rd label.

1. Open (or create) the report in design view.
Choose Page Setup from the File menu, and set the top and bottom margins
to
0.5 inch.

2. Set the Height of the Detail section to 2.666 inch. The actual
calculation for this is:
the page height, less page header height, less page footer height, less
2
times the spacer height, and divide the result by 3 labels:
(PageHeight - (PageHeader + PageFooter + 2 x Spacer)) / 3

3. Add a text box to the Detail section, and give it these properties:
Control Source =1
Running Sum Over All
Name txtCount
Format General Number
Visible No

4. Open the Sorting And Grouping dialog (View menu).
Select your primary key field.
In the lower pane of the dialog, set Group Footer to Yes.
Set the Height of this section to 1.0 inch. (This is the height of the
page
header, plus the height of the page footer.)

5. To suppress this group footer for the 3rd label on the page, set the
On
Format property of this group footer section to:
Event Procedure
Click the Build button (...) beside this.
Access opens the code window.
Add this line between the "Private Sub ..." and "End Sub" lines:

Private Sub GroupFooter0_Format(Cancel As Integer, FormatCount As
Integer)
Me.GroupFooter0.Visible = (((Me.txtCount - 1) Mod 3) <> 2)
End Sub


In the end, your 11" tall page looks like this:

,------------------------------------
| 0.5" Page Header
|---------------------------
|
|
| 2.666" Label 1
|
|
|-----------------
| 1.0" Group Footer (Spacer)
|
|--------------------------
|
|
| 2.666" Label 2
|
|
|-----------------
| 1.0" Group Footer (Spacer)
|
|---------------------------
|
|
| 2.666" Label 3
|
|
|-------------------------- (suppressed group footer is zero height here)
| 0.5" Page Footer
`--------------------------------------

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

CHAD GRAYBILL said:
Help, think I got way in over my head in this project. I had info in
old
dos
database time to bring it into the new century imported in Access.
I have created a new report in access for Volunteer Fire Company
fundrive.
My problem is I have a preprinted form on 8 1/2 X 11" that is split
into 3
equal sections, with same preprinted info in each of the 3 slips on the
form.
The problem is there is a default min. for top margins, which is linked
to
printer driver & cannot be changed. So, my first record prints fine,
but
the
2nd & 3rd slips print off the preprinted boxes.

I was told to make the report fit on the whole page (made it longer).
but
now, how do I get the 2nd & 3rd slips to go to the next records? I know
in
MS
Word just insert <next record> before the fields & it works fine, not
in
Acess it does not.

Does this require alot of custom vb stuff? Below is a sample of fields
&
text I have on the report for top slip, need it to go to next record
for
2nd
& 3rd.

Thanks in advance
Chad Graybill
(e-mail address removed)

**********************************************
Circle which amount donated $30.00 $40.00
$50.00

[LAST2]
=Trim([FIRST] & " " & [MI] & " " & [LAST])
="OR CURRENT RESIDENT"
=[ST_ADDRESS] & [AFFIX] & " " & [RD_DIRECT] & " " & [RD_ADDRESS]
=[CITY] & ", " & [STATE] & " " & [ZIP]
*******************************************************
 

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