Hello~
I've set the Can Grow property to Yes for all controls in the Detail section. This make the height of specific cell grows, but the height of other cell maintains. It looks weird when the border of cells are shown.
I tried to refer to https://www.access-programmers.co.u...ng-row-height-for-all-fields-in-a-row.248388/, but nothing worked in my file.
This is the code recommended in this report:
I'm not sure which is control name in this example I should change according to the control name in my file.
Can anyone tell me where I should change? Or is there any example file?
Thanks in advance!
I've set the Can Grow property to Yes for all controls in the Detail section. This make the height of specific cell grows, but the height of other cell maintains. It looks weird when the border of cells are shown.
I tried to refer to https://www.access-programmers.co.u...ng-row-height-for-all-fields-in-a-row.248388/, but nothing worked in my file.
This is the code recommended in this report:
Code:
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
'Duane Hookom 3.18.2008
Dim intMaxHeight As Integer
Dim ctl As Control
'Find highest control in Detail section that has a tag property of "Border"
For Each ctl In Me.Section(0).Controls
If ctl.Tag = "Border" Then
If ctl.Height > intMaxHeight Then
intMaxHeight = ctl.Height
End If
End If
Next
'Draw a box around each control in Detail that has a tag property of "Border"
For Each ctl In Me.Section(0).Controls
If ctl.Tag = "Border" Then
Me.Line (ctl.Left, ctl.Top)-Step(ctl.Width, intMaxHeight), vbBlack, B
'Me.DrawWidth = 6 'play with this number to make line thicker
End If
Next
End Sub
Can anyone tell me where I should change? Or is there any example file?
Thanks in advance!