B
Bonnie A
Hi everyone! Using A02 on XP. Have a main report with 14 subreports nested
in the body. They each have a field "Is this section applicable?". If the
answer is "No" (0) I don't want the subreport to be visible. (Can't use the
OnNoData because of the Yes/No field - all the subreports have some data if
only in the one field.)
I tried this:
Private Sub Report_Open(Cancel As Integer)
If Me.ShortPlanYearApplies = 0 Then
Me.Detail.Visible = False
End If
End Sub
BUT, I get a run time error #2427, "You have entered an expression that has
no value." I've checked the field and it has "No", click into the field and
it is a zero. I've even changed it to "Yes". In both cases, I get the error
and the subreport does not appear on the main report.
Not sure if I'm putting this in the wrong place, using the wrong command
(OnOpen; Detail.Visible) or what. I'm sure it's something simple but...
I would really appreciate it if anyone can give me some help or advice on
this.
Thanks in advance for your time and help. LUV U GUYS!!!
in the body. They each have a field "Is this section applicable?". If the
answer is "No" (0) I don't want the subreport to be visible. (Can't use the
OnNoData because of the Yes/No field - all the subreports have some data if
only in the one field.)
I tried this:
Private Sub Report_Open(Cancel As Integer)
If Me.ShortPlanYearApplies = 0 Then
Me.Detail.Visible = False
End If
End Sub
BUT, I get a run time error #2427, "You have entered an expression that has
no value." I've checked the field and it has "No", click into the field and
it is a zero. I've even changed it to "Yes". In both cases, I get the error
and the subreport does not appear on the main report.
Not sure if I'm putting this in the wrong place, using the wrong command
(OnOpen; Detail.Visible) or what. I'm sure it's something simple but...
I would really appreciate it if anyone can give me some help or advice on
this.
Thanks in advance for your time and help. LUV U GUYS!!!