Moondaddy,
Below are two similar methods you can use the utilize the report's Activate
event.
If you only need to check whether a *single* control is null, then you can
do this:
If IsNull(Me!txtID) Then
MsgBox "ID control is null. Making detail section invisible."
Me.Section(acDetail).Visible = False
End If
Alternatively, if you need to check whether all controls (of the below
specified types) are null, then you can do this:
Dim i As Integer
Dim blnAllNull As Boolean
For i = 0 To Me.Section(acDetail).Controls.Count - 1
With Me.Section(acDetail).Controls(i)
If (.ControlType = acCheckBox Or .ControlType = acComboBox _
Or .ControlType = acListBox Or .ControlType = acTextBox)
Then
If IsNull(.Value) Then
blnAllNull = True
Else
blnAllNull = False
Exit For
End If
End If
End With
Next
If blnAllNull Then
MsgBox "All detail controls are null. Making detail section
invisible."
Me.Section(acDetail).Visible = Not blnAllNull
End If
....and of course, you can remove the message boxes at your convenience.