Need to display blank fields

  • Thread starter Thread starter Michael
  • Start date Start date
M

Michael

It would be really good to have 26 records display per page (or at least on
1 page) even if there are only 2 records. In other words, today I have 2
checks but I need 24 blank records after to make up the entire deposit slip.
Someone mentioned a line method but I do not believe that would get me the
numbers 3. - 26. along side the blank records. Any ideas?
 
You could add code to the On Page event of your 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 = 26
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
 
Michael said:
It would be really good to have 26 records
display per page (or at least on 1 page) even
if there are only 2 records. In other words,
today I have 2 checks but I need 24 blank
records after to make up the entire deposit slip.
Someone mentioned a line method but I do
not believe that would get me the numbers
3. - 26. along side the blank records. Any ideas?

How about a separate 26-record table that you join to your table of actual
records, to force the lines? (You may have to "invent" a field to use for
joining, but that should be a solvable problem.)

Larry Linson
Microsoft Access MVP
 
I'm getting an overflow error from the following line of your code:

Me.CurrentY = intTopMargin + _
(intLineNumber * intLineHeight)

What do you make of that?
 
Will you explain further because you made me think of also trying to force
26 records in the query that I'm using. Any way to do that?
 
I need to also clarify that it needs to be dynamic so that if no matter how
many records I have the blank rows plus the rows that aren't blank should
equal 26 (28 in the future but right now I only have room for 26 and the 2
extra records aren't a deal break anyways).
 
Back
Top