I have been hunting for an IIF statement to use on a label. I've set the On NoData event to the following:
Code:
Private Sub Report_NoData(Cancel As Integer)
Me.Visible = False
End Sub
However, the label still remains. I've tried setting the label to this:
Code:
=iif(isnull([Form.qry_BP40_Gummy_FinalComposition_Orange subform rpt]),null,"FINAL COMPOSITION - ORANGE")
Unfortunately, the label doesn't disappear. Am I being dense? I've seen a couple of examples using the following code, but I do not know how to utilize them as I am trying to hide multiple subforms whenever they have no data. Plus, I cannot find the On Format property in Access 2016.
Code:
If IsNull(dataFIELD1) Then
Label1.Visible = False
Else
Label1.Visible = True
End If
With my limited understanding of this code, I thought it wouldn't work as I'm trying to hide several subforms/labels if they have no records.