Additional blank lines on a log sheet

  • Thread starter Thread starter Ron
  • Start date Start date
R

Ron

I want to create report that has 15 lines of detail in sub group section. If
there is less than 15 item in the sub group I want the rest of the area to
have blank lines so additional information can be hand written as needed.
It would be like an invoice with customer information at the top, and
anywhere from 1 to 15 items in the sub group area. However if the customer
only buys 3 items, I want the invoice to print 12 addition blank lines
(actual lines, not just blank space).
 
If the lines are all on a single page, you can use code in the On Page event
of the report like:

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 = 15
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.Line (intLineLeft, intTopMargin + _
(intLineNumber * intLineHeight)) _
-Step(intLineWidth, 0)
Next
End Sub
 
Back
Top