Print a blank repart

  • Thread starter Thread starter Anne
  • Start date Start date
A

Anne

I am using a time sheet which is distributed to the foremen for a
construction company. The code, which I got from this newsgroup quite a
while back, fills the blank rows with blank boxes, so the foremen can add
new employees. All that works great.

Because of the construction boom, they now want extra blank sheets. This
would have to be based on "nothing". Just the form with the headers and
blank boxes. When I remove the data, I get 2 headers and blank pages.
Is it possible to do a blank form in access?
 
Assuming you have some column labels in your page header with the labels
adjacent to each other and spreading across the report width. Place
"HeaderLabel" in the tag property of each column label. Then add this code
to the On Page event of your report. You can modify the line spacing or
other stuff to meet your needs.

Private Sub Report_Page()
Dim ctl As Control
Dim intLineSpacing As Integer
Dim intLineNum As Integer
intLineSpacing = 360 '1/4 inch

For Each ctl In Me.Controls
If ctl.Tag = "HeaderLabel" Then
Me.Line (ctl.Left, ctl.Top)-Step(0, 20000)
Me.Line (ctl.Left + ctl.Width, ctl.Top)-Step(0, 20000)
End If
Next
For intLineNum = 1 To 14000 \ intLineSpacing
Me.Line (0, intLineNum * intLineSpacing)-Step _
(Me.Width, 0)
Next
End Sub
 
I got it. I put the code back for the blank lines and based the report on
the table jobs and filtered it by the job "office" which will never end.
I took out all text boxes and with that I got one page with headers and
footers intact as well as my boxed fields throughout the entire page.
 
Hi Duane,
It has been so long I wasn't quite sure if it was your code, but now I am.
You actually allowed me to send you my database at the time and you fixed
one of my first difficult forms. That must have been at least 2 years ago.
Thank you again, I use it over and over again.
Anne.
 
Back
Top