N
Niall
I would like to know if it is possible to hide Fields with
Null Values. For example I may have a report that can have
up to ten fields; however, I may not want to show all of
the fields if they have Null values. Please keep in mind
that I do not want to hide RECORDS with NULL VALUES.
I am using the following code on the OnFormat event:
Private Sub Detail_Format(Cancel As Integer, FormatCount
As Integer)
On Error GoTo err_Detail_Format
Dim ctl As Control
For Each ctl In Me.Controls
If TypeOf ctl Is TextBox Then
If ctl.Text = "" Or IsNull(ctl.Text) Then
With ctl
..Visible = False
End With
Else
With ctl
..Visible = True
End With
End If
End If
Next ctl
exit_Detail_Format:
Exit Sub
err_Detail_Format:
MsgBox Err.Description
Resume exit_Detail_Format
End Sub
however this is only providing limited success
Null Values. For example I may have a report that can have
up to ten fields; however, I may not want to show all of
the fields if they have Null values. Please keep in mind
that I do not want to hide RECORDS with NULL VALUES.
I am using the following code on the OnFormat event:
Private Sub Detail_Format(Cancel As Integer, FormatCount
As Integer)
On Error GoTo err_Detail_Format
Dim ctl As Control
For Each ctl In Me.Controls
If TypeOf ctl Is TextBox Then
If ctl.Text = "" Or IsNull(ctl.Text) Then
With ctl
..Visible = False
End With
Else
With ctl
..Visible = True
End With
End If
End If
Next ctl
exit_Detail_Format:
Exit Sub
err_Detail_Format:
MsgBox Err.Description
Resume exit_Detail_Format
End Sub
however this is only providing limited success