How do I remove the gaps between records in my Access XP report?

A

AJK3

I have recently upgraded from Office 97 to Office 2003. The Access report I
have been running for years has been very economical on paper. I have two
subreports in the detail section of my main report and the subs are allowed
to expand. Now that the report is in Access 2003, even without the subs in
the detail, each record uses about 2.5cm instead of the usual 0.549cm. I have
set the new detail not to expand but it still does. Why? How can I prevent
this?
 
O

Ofer Cohen

Set the CanShrink property of the text boxes in the report, and of the Sction
where this text boxes located in to Yes.
That way this fields will shrink accordng to the values in them'
 
A

AJK3

Very many thanks, but I think I have found the problem....

I had some code in the report header that set the "detail" height to 0cm on
page 1 and 2.5cm on every other page. Unlike Access 97, Access 2003 is able
to do this easily from the report's main properties tab (Page Header.... Not
with Rpt Hdr). However, Access 2003 interpreted the "detail" to mean the
detail section on the main body of the report, not the page header itself.
The code in question (works fine in Access 97) is:

Private Sub PageHeader_Format(Cancel As Integer, FormatCount As Integer)
Dim Bln As Boolean, Ht As Integer
On Error Resume Next

Let Bln = (Page() > 1) 'Bln = False when Page() = 1
If Bln Then Let Ht = 567 Else Let Ht = 0

If Bln Then Let Me.Detail.Height = 2.5 * Ht
Let Me.PageHeader1.Visible = Bln
Let Me.PageHeader2.Visible = Bln
Let Me.PageHeader3.Visible = Bln
Let Me.PageHeader4.Visible = Bln
Let Me.PageHeader5.Visible = Bln
Let Me.PageHeader1.Height = Ht
Let Me.PageHeader2.Top = 1.5 * Ht
Let Me.PageHeader2.Height = Ht
Let Me.PageHeader3.Height = 0.5 * Ht
Let Me.PageHeader4.Height = 0.5 * Ht
Let Me.PageHeader5.Height = 0.5 * Ht
If Bln = False Then Let Me.Detail.Height = 0

End Sub

Please forgive the "On Error Resume Next" but I make so many mistakes, I
like Access to muddle along as best it can!

Anthony
 

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