I have a subreport with multiple controls on them with names as details1, details 2, details3 etc.
I am trying to get the report to format correctly when I output it.
My code is as follows
Private Sub Detail_Format(Cancel as Integer, FormatCount as Integer)
Dim intCtr as Integer
For IntCtr = 1 to 12
If Me("FromDepth" & intCtr) <> "" Then
Me("lblDrillF" & intCtr).Visible = True
Else
Me("Detail" & intCtr).Visible = True
End If
End Sub
What I want is that if FromDepth1 (to 12) has a value in it, then I want the lblDrillF1 (to 12) to be visible, else if there is no value in FromDepth1 (to 12), I want Detail1 (to 12) to be visible.
It works the first time around, but then I get the message "Invalid use of Null"
Thanks for your help.
Regards
BusMgr
I am trying to get the report to format correctly when I output it.
My code is as follows
Private Sub Detail_Format(Cancel as Integer, FormatCount as Integer)
Dim intCtr as Integer
For IntCtr = 1 to 12
If Me("FromDepth" & intCtr) <> "" Then
Me("lblDrillF" & intCtr).Visible = True
Else
Me("Detail" & intCtr).Visible = True
End If
End Sub
What I want is that if FromDepth1 (to 12) has a value in it, then I want the lblDrillF1 (to 12) to be visible, else if there is no value in FromDepth1 (to 12), I want Detail1 (to 12) to be visible.
It works the first time around, but then I get the message "Invalid use of Null"
Thanks for your help.
Regards
BusMgr