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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report

Status
Not open for further replies.

frenchy62

MIS
Feb 24, 2003
7
US
I have a report that will be listing the withholding table for the different levels of income. I would like to have the report draw a line after every 5th entry or after a rate change and then if the last few records do not total 5 I still want a line drawn after the last entry.

Keep in mind the code or solution will have to determine how many lines there are on a page, will have to take into consideration the margins, (top and bottom), page headers and footers etc.

 
Hi, I don't know about the last part, but you can run a textbox counter along side the records whose property is running sum over the group and control source =1. Run a line under the records and do something like this in the reports Format event and look for numbers ending in 0 or 5:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Select Case Right(Me.txtNo, 1)
Case 0, 5
Me.Line11.Visible = True

Case Else
Me.Line11.Visible = False

End Select
End Sub


Hope that helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top