nikademous
Technical User
Hello, I have a sub report that I want to use and understand how the line method works to draw lines around controls and the detail section.
In my sub report I have a text box named (txtComponentInstalInstruction) and next to it I have a image box (imgJobStep). The image is always going to be 400X400 Pixels so I need the (imgJobStep) to match up with it BUT dont allow the (imgJobStep) to expand past the 400 Pixels in height. I Have the the column layout going across then down so I can get a textbox/image "Space" textbox/image then down to next line so it fits 6 of those on a report.
The only way I got it working was to mess with the textbox width and the image width and keep going back and forth to print preview. Can someone please explain how this works? I also needed to limit the height of the textbox to no more than 400 Pixes and have no clue how...
Attached is an image of how I have it and how I want it to look just have no idea how it works...then theirs the 400px thing.
Thanks,
In my sub report I have a text box named (txtComponentInstalInstruction) and next to it I have a image box (imgJobStep). The image is always going to be 400X400 Pixels so I need the (imgJobStep) to match up with it BUT dont allow the (imgJobStep) to expand past the 400 Pixels in height. I Have the the column layout going across then down so I can get a textbox/image "Space" textbox/image then down to next line so it fits 6 of those on a report.
The only way I got it working was to mess with the textbox width and the image width and keep going back and forth to print preview. Can someone please explain how this works? I also needed to limit the height of the textbox to no more than 400 Pixes and have no clue how...
Attached is an image of how I have it and how I want it to look just have no idea how it works...then theirs the 400px thing.
Code:
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
' Stephen Lebans 1999
' Stephen@ lebans.com
' [URL unfurl="true"]www.lebans.com[/URL]
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
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 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
Thanks,