[AccessD] Can't suppress subreport

Gustav Brock gustav at cactus.dk
Mon Aug 9 02:41:33 CDT 2004


Hi Susan

So what you are trying to say is that the label should be set Visible
or not just like the subreport?

If so, is the label invisible if you manually (in report design)
make the subreport not visible?

/gustav


> The following procedure prints a "Missing Record" label in a subreport when
> there's a missing AutoNumber value -- I've based this particular example on
> the Products table in Northwind. It works fine, except for one thing -- it
> prints the subreport label text at the beginning of the Detail section --
> before the first record. For the life I've me, I can't seem to shut it up!
> The subreport is positioned at the beginning of the Detail section, just
> above the actual controls. 
 
> Susan H. 
 
 
> 'Track record ProductID values.
> Public lngMissingRecordFlag As Long
 
> Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
>   'If current record isn't one more than flag, print warning.
>   Dim lngRecordCounter As Long
>   lngRecordCounter = ProductID.Value
>   If lngMissingRecordFlag = (lngRecordCounter - 1) Then
>     Report.rptMissingRecordsub.Visible = False
>   ElseIf lngMissingRecordFlag <> (lngRecordCounter - 1) Then
>     Report.rptMissingRecordsub.Visible = True
>   End If
>   lngMissingRecordFlag = lngRecordCounter
> End Sub




More information about the AccessD mailing list