Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Public Function BasVertLn(Form As String, MyCtrl As String, _
Optional LR As Boolean = True) As String
'Michael Red, 12/1/2001
'Draw a Vertical Line Beside a Controls on a Report
'where the control's Properties CanGrow and CanShrink may be TRUE
Dim X1 As Double 'Left
Dim Y1 As Double 'Top
Dim X2 As Double 'Right
Dim Y2 As Double 'Bottom
Dim Offset As Long 'Border / Whitspace Width
Dim LnColor As Double 'Line color to Draw
Offset = 35
'Must be CALED from OnPrint Event of Report. Similar to:
'Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
' MyCoords = basVarBox(Me.name, Expression.name, False) Lines to RIGHT
'End Sub
' -OR-
'Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
' MyCoords = basVarBox(Me.name, Expression.name, True) Lines to LEFT
'End Sub
'Where:
' MyCoords is a Dummy (String) variable
' Me.Name is a constant (returns the Name of the REPORT)
' Expression(.Name) is the "name" of the Controls.
'Left X (Min of Left of the Control)
X1 = Reports(Form).Controls(MyCtrl).Left
X1 = X1 - Offset
'Right X (Max of Left + Width of the Controls)
X2 = Reports(Form).Controls(MyCtrl).Left + Reports(Form).Controls(MyCtrl).Width
X2 = X2 + Offset
'Top Y (Min of Top of the Controls)
Y1 = Reports(Form).Controls(MyCtrl).Top
Y1 = Y1 - Offset
'Bottom Y (Max of Top + Height of the Controls)
Y2 = Reports(Form).Controls(MyCtrl).Top + Reports(Form).Controls(MyCtrl).height
Y2 = Y2 + Offset
Select Case LR
Case Is = True
Reports(Form).Line (X1, Y1)-(X1, Y2), LnColor
Case Is = False
Reports(Form).Line (X2, Y1)-(X2, Y2), LnColor
End Select
End Function