I have an access 2000 Database with a report. There are 6 fields on the report with 2 of them as Text fields that can contain up to 255 characters of data. I have those 2 fields set to cangrow = Yes. The issue is that if those to fields do expand for the data the vertical lines between each field stay the original length.
I've tried using the Detail_Format Event and the Detail_Print Event to set the height of the vertical lines = the tallest of those 2 fields but in the detail format event it appears that the height is still set at the original and in the Detail_Print event setting the height of the line generates an error. I tried using the sort field for the report and included a group footer and tried setting the height of the vertical line at that point but it generated an error. I don't know what else to try.
Here's the Code as it is now:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim max_height As Long
max_height = 0
'If Me.PROV_GRP.Height > max_height Then max_height = Me.PROV_GRP.Height
If Me.NoteHeader.Height > max_height Then max_height = Me.NoteHeader.Height
If Me.Comments.Height > max_height Then max_height = Me.NoteHeader.Height
'Me.Line12.Height = Me.Height
'Me.Line13.Height = Me.Height
'Me.Line14.Height = Me.Height
'Me.Line15.Height = Me.Height
'Me.Line16.Height = Me.Height
'Me.Line12.Height = Me.Detail.Height
'Me.Line13.Height = Me.Detail.Height
'Me.Line14.Height = Me.Detail.Height
'Me.Line15.Height = Me.Detail.Height
'Me.Line16.Height = Me.Detail.Height
Me.Line12.Height = max_height
Me.Line13.Height = max_height
Me.Line14.Height = max_height
Me.Line15.Height = max_height
Me.Line16.Height = max_height
End Sub
As you can see I've tried several different methods none worked.
any help would be appreciated.
I've tried using the Detail_Format Event and the Detail_Print Event to set the height of the vertical lines = the tallest of those 2 fields but in the detail format event it appears that the height is still set at the original and in the Detail_Print event setting the height of the line generates an error. I tried using the sort field for the report and included a group footer and tried setting the height of the vertical line at that point but it generated an error. I don't know what else to try.
Here's the Code as it is now:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim max_height As Long
max_height = 0
'If Me.PROV_GRP.Height > max_height Then max_height = Me.PROV_GRP.Height
If Me.NoteHeader.Height > max_height Then max_height = Me.NoteHeader.Height
If Me.Comments.Height > max_height Then max_height = Me.NoteHeader.Height
'Me.Line12.Height = Me.Height
'Me.Line13.Height = Me.Height
'Me.Line14.Height = Me.Height
'Me.Line15.Height = Me.Height
'Me.Line16.Height = Me.Height
'Me.Line12.Height = Me.Detail.Height
'Me.Line13.Height = Me.Detail.Height
'Me.Line14.Height = Me.Detail.Height
'Me.Line15.Height = Me.Detail.Height
'Me.Line16.Height = Me.Detail.Height
Me.Line12.Height = max_height
Me.Line13.Height = max_height
Me.Line14.Height = max_height
Me.Line15.Height = max_height
Me.Line16.Height = max_height
End Sub
As you can see I've tried several different methods none worked.
any help would be appreciated.