making a report to replace a paper form with blank lines

  • Thread starter Thread starter DJ McNeill
  • Start date Start date
D

DJ McNeill

Hi,

I have to build a report that replaces a paper form. Part of the
information is stored in the access database but part of it still needs to
be filled in by hand. I can create the form but I the problem I am having
is that I would like to have some blank lines on the form that could be
filled in by hand. The report has header information and then a grid for
the details and I need blank lines on the details.

Is there a way to add rows to the detail when there is no data in the
database to do this?

Thanks,

DJ McNeill
 
Create a table with the same structure as the table you get your data from
for the report. Create whatever number of blank records in this table as you
want blank lines in your report. Create a union query between this table and
your data table and you will get the data for your report and blank lines.
 
I would not use line controls if you want them to extend beyond your detail
section. Consider using the Line method of the report in the On Page event
of the report. This code might get you headed in the right direction.

Private Sub Report_Page()
Dim intNumLines As Integer
Dim intLineNum As Integer
Dim intDetailHeight As Integer
Dim intPageHeadHeight As Integer
On Error GoTo Report_Page_Error

intNumLines = 35
intDetailHeight = Me.Section(acDetail).Height
intPageHeadHeight = Me.Section(3).Height
For intLineNum = 1 To intNumLines
Me.Line (0, intPageHeadHeight + intLineNum * intDetailHeight)- _
Step(Me.Width, 0)
Next

On Error GoTo 0
Exit Sub

Report_Page_Error:
Select Case Err
Case 2462 'no page header
intPageHeadHeight = 0
Resume Next
End Select
MsgBox "Error " & Err.Number & " (" & Err.Description & _
") in procedure Report_Page of VBA Document Report_Report1"

End Sub
 
Back
Top