Hi,
I'm trying to hide labels on a report when text boxes are empty.
The labels and text boxes are in the details section.
I use:
Me.labelName.Visible = Not (IsNull(Me.txtName))
Me.labelStreet.Visible = Not (IsNull(Me.txtStreet))
...
I put the in the OnFormat of the Details section, however, the labels are not hidden when the textboxes are empty.
I also read a post that suggested putting the code in OnCurrent of the Report, however, that doesn't work either. It only works if and when I set focus on a record.
Does anyone how to fix this? I've been searching for a while, so any help is very much appreciated. Thanks in advance.
I'm trying to hide labels on a report when text boxes are empty.
The labels and text boxes are in the details section.
I use:
Me.labelName.Visible = Not (IsNull(Me.txtName))
Me.labelStreet.Visible = Not (IsNull(Me.txtStreet))
...
I put the in the OnFormat of the Details section, however, the labels are not hidden when the textboxes are empty.
I also read a post that suggested putting the code in OnCurrent of the Report, however, that doesn't work either. It only works if and when I set focus on a record.
Does anyone how to fix this? I've been searching for a while, so any help is very much appreciated. Thanks in advance.