Suspress a control in the report

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, I have a control and its label in a report. The control is a remarks field which does not have data all the time. Is it possible to suspress (not print) this control if there is no data ?

Thanks
 
Several ways:

1. If there's nothing else on the row, set the CanShrink property to Yes.
2. In the On format event of the Detail section, a bit of code like:


Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Len(Me.MyControl & vbNullString) = 0 Then
Me.MyControl.Visible = False
End If
End Sub
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access

Amy said:
Hi, I have a control and its label in a report. The control is a remarks
field which does not have data all the time. Is it possible to suspress
(not print) this control if there is no data ?
 
Back
Top