DCRAPACCESS
asked on
set label visible false in main report from sub report
Hi Experts
Can someone tell how I change the visibility of a label in the main report, if there are no data in a subreport?
Can someone tell how I change the visibility of a label in the main report, if there are no data in a subreport?
ASKER
the autofinish don't show the .RecordCount option. and i get and error message saying "you entered an expression that has an invalid reference to the property From/report"
should i you the real name of the subreport or the name it has been giving in the main report?
real name "Urpt_Benchmark_oversigt_M ifid" or name in main report "subBenchmark"
If Me.subBenchmark.Form.Recor dsetClone. RecordCoun t = 0 Then
Me.Label114.Visible = False
Me.Label121.Visible = False
Else
Me.Label114.Visible = True
Me.Label121.Visible = True
End If
should i you the real name of the subreport or the name it has been giving in the main report?
real name "Urpt_Benchmark_oversigt_M
If Me.subBenchmark.Form.Recor
Me.Label114.Visible = False
Me.Label121.Visible = False
Else
Me.Label114.Visible = True
Me.Label121.Visible = True
End If
You must use the name of the subform container control as it it seen on the main form.
ASKER
yes, i have done that but still i get the error :-(
i have set the code in the "Report_Open" sub.
Should it be set elsewhere?
i have set the code in the "Report_Open" sub.
Should it be set elsewhere?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thank you, that was the thing I needed :-)
If Me.subformname.Form.Record
me.labelname.visible = false
else
me.labelname.visible = true
end if