I have five fields I'm printing on a report. One of those fields is a 'Notes' field. The notes are in the detail section. I want the field and text label excluded from the report if it is blank. I was already recommended some code to put in the OnFormat property in the detail section of the report, but I get an error message when I try to open the report.
The error message is:
Run-time error '424':
Object required
And it gives the option to debug, highlighting the second line of code in yellow:
If Len(Trim(Nz(txtNotes, "")) = 0 Then
txtNotes.Visible = False
lblNotes.Visible = False
Else
txtNotes.Visible = True
lblNotes.Visible = True
End If
Any trobleshootg ideas? Another way?
The error message is:
Run-time error '424':
Object required
And it gives the option to debug, highlighting the second line of code in yellow:
If Len(Trim(Nz(txtNotes, "")) = 0 Then
txtNotes.Visible = False
lblNotes.Visible = False
Else
txtNotes.Visible = True
lblNotes.Visible = True
End If
Any trobleshootg ideas? Another way?