Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need report to show 20 rows, combination of table info and blanks

Status
Not open for further replies.

Achmed

Technical User
Jun 4, 2001
64
CA
Hi everybody,

looking for some advice- I'm printing a report that shows a list of people currently registered for a course followed by blank spaces for signing up more people when it's printed out

example:
20 people allowed in a course total
x people registered already in a table, where (x < 20)

first x rows filled with the information in table; require (20-x) blank rows after that

I'm not sure how to go about doing this. Any advice?
Thanks in advance
Alan
 
Thanks for the reply.

Basically, I want it to look like a table with 20 rows on it where the top 12 rows in this example are filled out with information from a table and the remaining 8 are used for manual imput (hand written) on the printed report. The "blank" rows are just lines to keep the hand written information in the right places.

All 20 will fit on the first (and only) page of the report.

Thanks
Alan
 
You can create 20 lines on a page regardless of the number of records with code like:
Code:
Private Sub Report_Page()
    Dim intNumLines As Integer
    Dim intLineNumber As Integer
    Dim intTopMargin As Integer
    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
    For intLineNumber = 0 To intNumLines - 1
        Me.Line (intLineLeft, intTopMargin + _
            (intLineNumber * intLineHeight)) _
            -Step(intLineWidth, 0)
    Next
End Sub

Duane
Hook'D on Access
MS Access MVP
 
Code:
Function LabelLayout(R As Report)
  If BlankCount& < LabelBlanks& Then
    R.NextRecord = False
    R.PrintSection = False
    BlankCount& = BlankCount& + 1
  End If
End Function

This works in the opposite way and skips rows at the top not the bottom. call it by using =lablelayout(reports![nameofreport])
in the detail/onprint property of the report

Ian Mayor (UK)
Program Error
Your lack of planning is not my emergency!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top