Shrinking detail (Controls and labels)

B

Bongard

Here is the deal with my report. I have two controls in the detail
section [Notes] and [Date]. I also have the label for Notes sitting
right next to it so my detail section looks like this.

Notes [Notes] [Date]

Sometimes for a transaction there are no notes and in that case I want
to hide and shrink the detail and skip to the next note. Right now I
can hide the detail section but it is not shrinking. I have can shrink
on the two controls set to yes and in the On Print event of the detail
I have:

rivate Sub Detail_Print(Cancel As Integer, PrintCount As Integer)

If IsNull([Notes]) Then
Me.PrintSection = False
Me.NextRecord = True
Me.ScaleHeight = 0

My detail section looks like this

Notes [Notes] [Date]




Notes [Notes] [Date]

and I want it to skip the blank spaces and looks like this:

Notes [Notes] [Date]
Notes [Notes] [Date]

etc...

Any ideas?

Thanks!
 
D

Duane Hookom

Use code in the On Format event like:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Cancel = IsNull([Notes])
End Sub
 

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