Add lines or blanks to report

C

Cornfused

I am using a report to create a roster for attendees. The attendees are
invited and loaded into the database prior to the course. The report has, in
it's detail section, the following text boxes:
1. running sum
2. Attendee (control source: [qry_Attendees]![Attendee])
3. Employee ID (control source: [qry_Attendees]![EE_ID])
4. Signature (signed by attendee)

The problem is that many times there are more attendees than were originally
invited. How can I provide them space to sign the printed roster?

I'd like to have the whole page filled with Attendee, EE_ID and Signature
lines regardless of the number of known attendees.

Help?
 
D

Duane Hookom

I would use code to create all numbers and lines. Here is sample code that
draw 20 lines in the detail section of the report.

Private Sub Report_Page()
Dim intNumLines As Integer
Dim intLineNumber As Integer
Dim intTopMargin As Integer
Dim ctl As Control
Dim intLineHeight As Integer
Dim intLineLeft As Integer
Dim intLineWidth As Integer
intNumLines = 20
intLineLeft = 720 '1/2 inch from left margin
intLineWidth = 1440 * 5 '5 inches
intTopMargin = Me.Section(3).Height
intLineHeight = Me.Section(0).Height
Me.FontSize = 14
For intLineNumber = 0 To intNumLines - 1
Me.CurrentX = intLineLeft
Me.CurrentY = intTopMargin + _
(intLineNumber * intLineHeight)
Me.Print intLineNumber + 1
Me.Line (intLineLeft, intTopMargin + _
(intLineNumber * intLineHeight)) _
-Step(intLineWidth, 0)
Next
End Sub
 
C

Cornfused

Thanks Duane!!

That's going to get me most of the way there...

There is one important tweak that I need to have, and that's the ability to
make the number of lines variable based on the number of records.

Ex: One class has 20 scheduled attendees - I need 20 lines filled and, say,
20 more lines.
OR
One class has 8 scheduled attendees - to make 40 total lines, I'd need 32
blank ones.

Is this possible?

Duane Hookom said:
I would use code to create all numbers and lines. Here is sample code that
draw 20 lines in the detail section of the report.

Private Sub Report_Page()
Dim intNumLines As Integer
Dim intLineNumber As Integer
Dim intTopMargin As Integer
Dim ctl As Control
Dim intLineHeight As Integer
Dim intLineLeft As Integer
Dim intLineWidth As Integer
intNumLines = 20
intLineLeft = 720 '1/2 inch from left margin
intLineWidth = 1440 * 5 '5 inches
intTopMargin = Me.Section(3).Height
intLineHeight = Me.Section(0).Height
Me.FontSize = 14
For intLineNumber = 0 To intNumLines - 1
Me.CurrentX = intLineLeft
Me.CurrentY = intTopMargin + _
(intLineNumber * intLineHeight)
Me.Print intLineNumber + 1
Me.Line (intLineLeft, intTopMargin + _
(intLineNumber * intLineHeight)) _
-Step(intLineWidth, 0)
Next
End Sub
--
Duane Hookom
Microsoft Access MVP
If I have helped you, please help me by donating to UCP
http://www.access.hookom.net/UCP/Default.htm


Cornfused said:
I am using a report to create a roster for attendees. The attendees are
invited and loaded into the database prior to the course. The report has, in
it's detail section, the following text boxes:
1. running sum
2. Attendee (control source: [qry_Attendees]![Attendee])
3. Employee ID (control source: [qry_Attendees]![EE_ID])
4. Signature (signed by attendee)

The problem is that many times there are more attendees than were originally
invited. How can I provide them space to sign the printed roster?

I'd like to have the whole page filled with Attendee, EE_ID and Signature
lines regardless of the number of known attendees.

Help?
 
D

Duane Hookom

I'm not sure why the code won't get you all the way there. It seems you want
a total of 40 lines on your page. Change:
intNumLines = 20
to
intNumLines = 40


--
Duane Hookom
Microsoft Access MVP
If I have helped you, please help me by donating to UCP
http://www.access.hookom.net/UCP/Default.htm


Cornfused said:
Thanks Duane!!

That's going to get me most of the way there...

There is one important tweak that I need to have, and that's the ability to
make the number of lines variable based on the number of records.

Ex: One class has 20 scheduled attendees - I need 20 lines filled and, say,
20 more lines.
OR
One class has 8 scheduled attendees - to make 40 total lines, I'd need 32
blank ones.

Is this possible?

Duane Hookom said:
I would use code to create all numbers and lines. Here is sample code that
draw 20 lines in the detail section of the report.

Private Sub Report_Page()
Dim intNumLines As Integer
Dim intLineNumber As Integer
Dim intTopMargin As Integer
Dim ctl As Control
Dim intLineHeight As Integer
Dim intLineLeft As Integer
Dim intLineWidth As Integer
intNumLines = 20
intLineLeft = 720 '1/2 inch from left margin
intLineWidth = 1440 * 5 '5 inches
intTopMargin = Me.Section(3).Height
intLineHeight = Me.Section(0).Height
Me.FontSize = 14
For intLineNumber = 0 To intNumLines - 1
Me.CurrentX = intLineLeft
Me.CurrentY = intTopMargin + _
(intLineNumber * intLineHeight)
Me.Print intLineNumber + 1
Me.Line (intLineLeft, intTopMargin + _
(intLineNumber * intLineHeight)) _
-Step(intLineWidth, 0)
Next
End Sub
--
Duane Hookom
Microsoft Access MVP
If I have helped you, please help me by donating to UCP
http://www.access.hookom.net/UCP/Default.htm


Cornfused said:
I am using a report to create a roster for attendees. The attendees are
invited and loaded into the database prior to the course. The report has, in
it's detail section, the following text boxes:
1. running sum
2. Attendee (control source: [qry_Attendees]![Attendee])
3. Employee ID (control source: [qry_Attendees]![EE_ID])
4. Signature (signed by attendee)

The problem is that many times there are more attendees than were originally
invited. How can I provide them space to sign the printed roster?

I'd like to have the whole page filled with Attendee, EE_ID and Signature
lines regardless of the number of known attendees.

Help?
 
C

Cornfused

I was of the opinion that there must be some dependancy on the number of
supplied records. I guess I was mistaken, then. I'll put this in a test
report right away!

Anyway, thanks so much, Duane. I appreciate your willingness to help.

Duane Hookom said:
I'm not sure why the code won't get you all the way there. It seems you want
a total of 40 lines on your page. Change:
intNumLines = 20
to
intNumLines = 40


--
Duane Hookom
Microsoft Access MVP
If I have helped you, please help me by donating to UCP
http://www.access.hookom.net/UCP/Default.htm


Cornfused said:
Thanks Duane!!

That's going to get me most of the way there...

There is one important tweak that I need to have, and that's the ability to
make the number of lines variable based on the number of records.

Ex: One class has 20 scheduled attendees - I need 20 lines filled and, say,
20 more lines.
OR
One class has 8 scheduled attendees - to make 40 total lines, I'd need 32
blank ones.

Is this possible?

Duane Hookom said:
I would use code to create all numbers and lines. Here is sample code that
draw 20 lines in the detail section of the report.

Private Sub Report_Page()
Dim intNumLines As Integer
Dim intLineNumber As Integer
Dim intTopMargin As Integer
Dim ctl As Control
Dim intLineHeight As Integer
Dim intLineLeft As Integer
Dim intLineWidth As Integer
intNumLines = 20
intLineLeft = 720 '1/2 inch from left margin
intLineWidth = 1440 * 5 '5 inches
intTopMargin = Me.Section(3).Height
intLineHeight = Me.Section(0).Height
Me.FontSize = 14
For intLineNumber = 0 To intNumLines - 1
Me.CurrentX = intLineLeft
Me.CurrentY = intTopMargin + _
(intLineNumber * intLineHeight)
Me.Print intLineNumber + 1
Me.Line (intLineLeft, intTopMargin + _
(intLineNumber * intLineHeight)) _
-Step(intLineWidth, 0)
Next
End Sub
--
Duane Hookom
Microsoft Access MVP
If I have helped you, please help me by donating to UCP
http://www.access.hookom.net/UCP/Default.htm


:

I am using a report to create a roster for attendees. The attendees are
invited and loaded into the database prior to the course. The report has, in
it's detail section, the following text boxes:
1. running sum
2. Attendee (control source: [qry_Attendees]![Attendee])
3. Employee ID (control source: [qry_Attendees]![EE_ID])
4. Signature (signed by attendee)

The problem is that many times there are more attendees than were originally
invited. How can I provide them space to sign the printed roster?

I'd like to have the whole page filled with Attendee, EE_ID and Signature
lines regardless of the number of known attendees.

Help?
 

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