Detail section's Height property does not alter when shrinks / gro

  • Thread starter Thread starter Pete
  • Start date Start date
P

Pete

Re Access 2003 SP3

I have a report which prints ony a single page each time. Only Page Header,
Detail & Page Footer sections exist on the report.

The Detail section has two sets of addresses (vertically aligned - no
overlaps) and the address textboxes have their CanShrink property set to yes.

I wish to draw boxes in this section and need to establish the Detail
section's Top & Height values for the dimensions of the boxes using the line
method.

I have tried the following (from a previous post) but the height value never
alters when the address fields shrink (as they are blank).

Option Compare Database
Private lngDetailBottom As Long

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
lngDetailBottom = Me.Top + Me.Height
End Sub

Private Sub Report_Page()
MsgBox lngDetailBottom
End Sub

I can measure the physical height in print preview and this does prove the
height of the Detail section to be resizing as it should.

Any advice is greatly appreciated.
Many thanks.
Pete.
 
Pete said:
Re Access 2003 SP3

I have a report which prints ony a single page each time. Only Page Header,
Detail & Page Footer sections exist on the report.

The Detail section has two sets of addresses (vertically aligned - no
overlaps) and the address textboxes have their CanShrink property set to yes.

I wish to draw boxes in this section and need to establish the Detail
section's Top & Height values for the dimensions of the boxes using the line
method.

I have tried the following (from a previous post) but the height value never
alters when the address fields shrink (as they are blank).

Option Compare Database
Private lngDetailBottom As Long

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
lngDetailBottom = Me.Top + Me.Height
End Sub

Private Sub Report_Page()
MsgBox lngDetailBottom
End Sub


The only reason I can think of is that you forgot to set the
detail section's CanShrink property to Yes. The text boxes
are shrinking, but unless you also set the section's
property, it won't shrink.
 
Well spotted Marshall.

The variable is now updating correctly.
The only bizarre thing is that (as mentioned above) the Detail section was
actually shrinking, which I proved by physically measuring it in print
preview.

Anyway, problem sorted.

Thank you very much for pointing me in the right direction.
Rgds,
Pete.
 
Back
Top