Help - need to draw a table in access using verticle lines drawn dynamically at report run time using the On-Page event.
Trouble is I don't know the verticle length in advance. I can use a verticle 'bottom' value = 18.3 to draw a line to just above my footer, but need it to stop at bottom of 'detail' section when the size of 'detail' and 'footer' are using 'can grow' = yes.
I have re-produced my feeble attempt below - can anybody tell me what I am doing wrong !
Private Sub Report_Page()
Dim asglPos(20) As Single
Dim sglTop As Single, sglBottom
'Set up Positions for Boxes
asglPos(0) = 0
asglPos(1) = 4.1
asglPos(2) = 11.5
asglPos(3) = 16.5
asglPos(4) = 24#
asglPos(5) = 26.4
If Me.Properties("acHiddenCurrentPage") = 1 Then
sglTop = (Me.Section(1).Height / 567) + 1#
Else
sglTop = 1#
End If
'sglBottom = 18.3 ' to draw to fixed footer - works OK
'but need 'dynamic' length
sglBottom = (Me.Section(acPageHeader).Height + Me.Section(acDetail).Height) / 567 + 1#
Me.DrawWidth = 1
'Always draw Vertical Lines
For intCount = 0 To 5
Me.Line (asglPos(intCount) * 567, sglTop * 567)-(asglPos(intCount) * 567, sglBottom * 567)
Next intCount
Me.Line (0, sglTop * 567)-(asglPos(5) * 567, sglTop * 567)
Me.Line (0, sglBottom * 567)-(asglPos(5) * 567, sglBottom * 567)
End sub
Any help would be appreciated !!
Thanks in advance.
Trouble is I don't know the verticle length in advance. I can use a verticle 'bottom' value = 18.3 to draw a line to just above my footer, but need it to stop at bottom of 'detail' section when the size of 'detail' and 'footer' are using 'can grow' = yes.
I have re-produced my feeble attempt below - can anybody tell me what I am doing wrong !
Private Sub Report_Page()
Dim asglPos(20) As Single
Dim sglTop As Single, sglBottom
'Set up Positions for Boxes
asglPos(0) = 0
asglPos(1) = 4.1
asglPos(2) = 11.5
asglPos(3) = 16.5
asglPos(4) = 24#
asglPos(5) = 26.4
If Me.Properties("acHiddenCurrentPage") = 1 Then
sglTop = (Me.Section(1).Height / 567) + 1#
Else
sglTop = 1#
End If
'sglBottom = 18.3 ' to draw to fixed footer - works OK
'but need 'dynamic' length
sglBottom = (Me.Section(acPageHeader).Height + Me.Section(acDetail).Height) / 567 + 1#
Me.DrawWidth = 1
'Always draw Vertical Lines
For intCount = 0 To 5
Me.Line (asglPos(intCount) * 567, sglTop * 567)-(asglPos(intCount) * 567, sglBottom * 567)
Next intCount
Me.Line (0, sglTop * 567)-(asglPos(5) * 567, sglTop * 567)
Me.Line (0, sglBottom * 567)-(asglPos(5) * 567, sglBottom * 567)
End sub
Any help would be appreciated !!
Thanks in advance.