making a report to replace a paper form with blank lines

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
 
P

PC Datasheet

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.
 
D

Duane Hookom

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top