Simulating a manual form

  • Thread starter Thread starter waytak
  • Start date Start date
W

waytak

I was happy to find a Microsoft Access Tip relating to “Numbering Entries in
a Report†which is exactly what I was trying to do to simulate a manual form
that we use. This manual form has 15 numbered lines (boxes) per page. My
report has only three records so only three of the lines(boxes) printed (line
1,2 and 3) and the remainder of the page blank. How can I force it to print
all 15 lines(boxes) with the remaining 12 containing blanks to fill the
entire page?
 
A file sent doesn't do much for the common reader of this thread.

Typically you want to use the Line method in code to draw the lines. This is
handled in the On Page event of the report. Here is some sample code that
draws and numbers 20 lines. Let me know if you have any questions.

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


Steve said:
I sent you a procedure from my file. Did you get it?

Steve
(e-mail address removed)
 
Back
Top