By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,903 Members | 2,075 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,903 IT Pros & Developers. It's quick & easy.

Vertical lines in report (code check needed)

P: n/a
I've adopted the code below that draws lines around six subreports on
my report...so the result is a grid effect. However, my first subform
starts to the left at 900 twips (0.625"), not 0. I can't figure out how
to realign the draw command so it starts drawing the boxes at 900 twips
to the left of 0. I've tried replacing the "0" with "900" and "0.625"
in the line with "Me.Line (lngLeft, 0)-(lngLeft, lngHeight)" and don't
get the desired results.

Any help is greatly appreciated!

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Dim lngHeight As Long 'store the height of tallest control
Dim i As Integer
Dim lngLeft As Long
For i = 1 To 6
'compare heights
If Me("srpt" & i).Height > lngHeight Then
lngHeight = Me("srpt" & i).Height
End If
Next
'add the height of other control
lngHeight = lngHeight + Me.txtThYear.Height
'draw the lines
For i = 0 To 6
lngLeft = i * Me.srpt1.Width
Me.Line (lngLeft, 0)-(lngLeft, lngHeight)
Next
End Sub

Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Soundneedle,
The values you'ved tried suggests you have not understood the line
object (I am not familiar with it either) If it is inches(unlikely)
you might try a negative number.

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.