Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Not IsNull(Me.txtUnboundImagePath) Then
Me.imgJobStep.Top = 50
Me.imgJobStep.Height = 1275
End If
End Sub
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
'****************************Replaces picture with default image if you dont have a picture
'Gets path of current DB in module
If DCount("[JobStepID]", "tbl_JobSteps", "[ImagePath]=""" & txtImagePath & """") > 0 Then
Me!imgJobStep.Picture = GetCurrentPath() & "/VWI_Images/imgDefault.jpg"
End If
Dim CtlDetail As Control
Dim intLineMargin As Integer
' This is the spacing between the right edge of the control and the Vertical Seperation Line
intLineMargin = 60
' OK lets draw a vertical line to seperate each field
' for each control in details control
' If your last control on the right does not end on the edge of the section
' you will get a second vertical line. If you need to get around this then you
' can skip drawing this last Vertical Seperation Line in a couple of ways.
' We'll use the control name method Here. Our right most control is named
' TestMemo. IF current control is TestMemo - Do not print Vertical Line
For Each CtlDetail In Me.Section(acDetail).Controls
If CtlDetail.Visible = True Then 'Added
With CtlDetail
Me.Line ((.Left + .Width + intLineMargin), 0)-(.Left + .Width + _
intLineMargin, Me.Height)
'End If
End With 'Added
End If
Next
'While we are here lets draw a box around the Detail section
With Me
Me.Line (0, 0)-Step(.Width, .Height), 0, B
End With
Set CtlDetail = Nothing
End Sub