As I explained already in the past, I succeeded to get vertical lines in all a report, but there are some grouphead and I don't want them included in those vertical lines... So when you add size of sections (groupheader, pageheader) it gives a fixed height, but the datas in "A" can change the height... so my vertical line begins at the wrong place. Me.line ( ,A) - ( , B)
Other case, with the codes herewith below. I need the vertical line going from the section details (without grouphead) to the end of each page of the state. It should be simple because the reference at the end of the page do not move. I suppose we need to identify the end of the page and then to refer to it at place of "B".
Me.line ( ,A) - ( , B)
Please experiment a solution before giving it. It seems to be simple, but when you experiment, the solution is not ok. Thks for your kind help.
I precise than "Me.ScaleHeight" in place of "B" do not succeed.
Those codes are OK for section details, but vertical lines are not going till the end of the page.
Codes :
Option Compare Database
Option Explicit
Sub someControl_AfterUpdate()
Me!SomeControl = UCase(Me!SomeControl)
' ou encore
' me!SomeControl = Lcase(me!SomeControl)
End Sub
Private Sub Détail_Print(Cancel As Integer, PrintCount As Integer)
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 = 10
' 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
With CtlDetail
'If CtlDetail.name <> "TestMemo" Then
Me.Line ((.Left + .Width + intLineMargin), 0)-(.Left + .Width + _
intLineMargin, Me.Height)
'End If
End With
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
Private Sub Report_Activate()
DoCmd.Maximize
End Sub
Other case, with the codes herewith below. I need the vertical line going from the section details (without grouphead) to the end of each page of the state. It should be simple because the reference at the end of the page do not move. I suppose we need to identify the end of the page and then to refer to it at place of "B".
Me.line ( ,A) - ( , B)
Please experiment a solution before giving it. It seems to be simple, but when you experiment, the solution is not ok. Thks for your kind help.
I precise than "Me.ScaleHeight" in place of "B" do not succeed.
Those codes are OK for section details, but vertical lines are not going till the end of the page.
Codes :
Option Compare Database
Option Explicit
Sub someControl_AfterUpdate()
Me!SomeControl = UCase(Me!SomeControl)
' ou encore
' me!SomeControl = Lcase(me!SomeControl)
End Sub
Private Sub Détail_Print(Cancel As Integer, PrintCount As Integer)
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 = 10
' 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
With CtlDetail
'If CtlDetail.name <> "TestMemo" Then
Me.Line ((.Left + .Width + intLineMargin), 0)-(.Left + .Width + _
intLineMargin, Me.Height)
'End If
End With
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
Private Sub Report_Activate()
DoCmd.Maximize
End Sub