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

Vertical line - not so easy

Status
Not open for further replies.

Olifour

Technical User
Mar 6, 2002
12
0
0
FR
Don't ask me why, but I need to trace in a state a vertical line (not a border) from a horizontal line named "Line173" which is in a groupheader to the end of the page (without the pagefooter).
So the following code trace the line from the top of the state to the end of the page without the page footer :
Me.Line ((0), 1)-(0, .ScaleHeight - (.Section(acPageFooter).Height))
I'm nearly sure to have to replace the "1", but by what ?
Please let me know.
Your free assistance would be highly appreciated. After, i will extend this to few vertical lines. Please do not mentionn other method. This is the one I need.

 
Line173.top

???


MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Try the following:

Code:
Option Compare Database
Option Explicit

Dim intGroupCount As Integer
Dim asngGroupTop(50) As Single

...

Private Sub GroupHeader0_Print(Cancel As Integer, PrintCount As Integer)
  intGroupCount = intGroupCount + 1
  asngGroupTop = Me.Top + Me.Line173.Top
End Sub

...

Private Sub Report_Page()
  Dim sngLeft, sngTop     As Single
  Dim sngWidth, sngHeight As Single
  Dim i As Integer

  For i = 1 To intGroupCount
    Me.Line (i * 720, asngGroupTop(i))-Step(0,Me.ScaleHeight - Me.Section(acPageFooter).Height - asngGroupTop(i))
  Next i
  intGroupCount = 0
End Sub

This will print vertical lines at 1/2 inch intervals (assuming the ScaleMode is set to Twips) for each group header from Line173 to the top edge of the PageFooter.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top