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

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.
 
M

Marshall Barton

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.
 
P

Pete

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top