bissonette
06-30-2004, 09:58 AM
I am using the following code for a blank field problems i was having and I get a run time error and the debugger goes to line "If IsNull(ctl.Value) Then" and says something is wrong with it. Any suggestions????
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim ctl As Control
Dim blnNoPrint As Boolean
For Each ctl In Me.Controls
If ctl.Tag = "CheckIt" Then
If IsNull(ctl.Value) Then
blnNoPrint = True
Exit For
End If
End If
Next
If blnNoPrint Then
Me.MoveLayout = False
Me.PrintSection = False
Else
Me.PrintSection = True
End If
End Sub
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim ctl As Control
Dim blnNoPrint As Boolean
For Each ctl In Me.Controls
If ctl.Tag = "CheckIt" Then
If IsNull(ctl.Value) Then
blnNoPrint = True
Exit For
End If
End If
Next
If blnNoPrint Then
Me.MoveLayout = False
Me.PrintSection = False
Else
Me.PrintSection = True
End If
End Sub