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! >
|