Group:  Microsoft Access ยป microsoft.public.access.reports
Thread: Shrinking detail (Controls and labels)

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Shrinking detail (Controls and labels)
"Bongard" <b.bomgren[ at ]gmail.com> 21.09.2006 12:55:49
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!

Re: Shrinking detail (Controls and labels)
"Duane Hookom" <DuaneAtNoSpanHookomDotNet> 21.09.2006 13:33:00
Use code in the On Format event like:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Cancel = IsNull([Notes])
End Sub


--
Duane Hookom
MS Access MVP

"Bongard" <b.bomgren[ at ]gmail.com> wrote in message
news:1158843349.224474.97190[ at ]d34g2000cwd.googlegroups.com...
[Quoted Text]
> 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!
>


Re: Shrinking detail (Controls and labels)
"Bongard" <b.bomgren[ at ]gmail.com> 21.09.2006 13:51:35
So simple I love it, thanks Duane, you are very helpful!

-Brian

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net