Adding Blank Rows after the last Detail of the Report

M

Ms. Confused

Hi All,
I've used this code from Dwayne:

Private Sub Report_Page()

Dim intNumLines As Integer

Dim intLineNumber As Integer

Dim intTopMargin As Integer

Dim ctl As Control

Dim intLineHeight As Integer

intNumLines = 12

intTopMargin = Me.Section(3).Height

intLineHeight = Me.Section(0).Height

For Each ctl In Me.Section(0).Controls

For intLineNumber = 0 To intNumLines - 1

Me.Line (ctl.Left, intTopMargin + _

(intLineNumber * intLineHeight)) - _

Step(ctl.Width, intLineHeight), , B

Next

Next

End Sub

My report needs to print blank rows (at least 12) after the last data is
printed. We have walk in clients that needs to be added in all our class
subjects in school.
I did put this on the event at "On Page", but it always print eventhough
there is data instead of printing after the last record. I am now looking at
blank rows on top of my data. All the remaining pages looks good though.

Please help.
Thanks.
Ms. Confused
 
S

Steve

Gather the data that you need to print in a query. Create a second query
that returns only blank lines, Set it up so the number of blank lines is
what you need to fill the page. Make a union query out of the two queries.
Use the union query as the recordsource of your report.

Steve
(e-mail address removed)
 
D

Duane Hookom

There should be no need for code or a union query. Simply create a Report
Footer (or Group Footer) that is tall enough for you to add 12 horizontal
lines.

Duane Hookom
MS Access MVP
 
M

Ms. Confused

@Steve - thank you so much for your suggestion but I was avoiding union
queries.

@Duane -
Thank you and it did worked after manipulating the report footer,
a little on the detail section, and adjusting the section height.

Sorry for misspelling your name.

Until next time!!!!
Ms. Confused No More :)
 

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