By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,490 Members | 1,489 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,490 IT Pros & Developers. It's quick & easy.

Changing the visible setting for a field in a sub report

P: n/a
I have a command button that opens the a report. On the report the
bulk of the information is in the sub report. I have a check box on
the form that if isn't check will cause a field to be invisible on the
report. I want to be able to set the corresponding field on the sub
report the same way. I can't seem to get the syntax right to change
the visible value in the sub report. Right now I'm using "Reports!
rpt_top_user!rpt_top_user_sub!ts_opname.Visible = False" and the I get
an error saying that if can't find the field "rpt_top_user_sub". Any
ideas??

Mar 19 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a

I think the normal breakdown is:
Main Report Sub Report Control Name.Report >Sub Report Control Name

Reports!rpt_top_user!rpt_top_user_sub.Report!ts_op name.Visible = False
where rpt_top_user_sub is the name of the subreport control, not the
name of the report in it.

Where are you using this statement by the way?

Mar 19 '07 #2

P: n/a
I believe you can use the "Parent" property in a sub report. In the onFormat
event of the subreport use Me.Parent to check the value of your check box
and set the control's visibility.

"Bill" <wl*********@gmail.comwrote in message
news:11**********************@l75g2000hse.googlegr oups.com...
I have a command button that opens the a report. On the report the
bulk of the information is in the sub report. I have a check box on
the form that if isn't check will cause a field to be invisible on the
report. I want to be able to set the corresponding field on the sub
report the same way. I can't seem to get the syntax right to change
the visible value in the sub report. Right now I'm using "Reports!
rpt_top_user!rpt_top_user_sub!ts_opname.Visible = False" and the I get
an error saying that if can't find the field "rpt_top_user_sub". Any
ideas??

Mar 20 '07 #3

P: n/a
On Mar 19, 6:07 pm, "storrboy" <storr...@sympatico.cawrote:
I think the normal breakdown is:
Main Report Sub Report Control Name.Report >Sub Report Control Name

Reports!rpt_top_user!rpt_top_user_sub.Report!ts_op name.Visible = False
where rpt_top_user_sub is the name of the subreport control, not the
name of the report in it.

Where are you using this statement by the way?
I'm using this statement for the "on click" of the command button. It
comes right after the statement is issued to open the report

Mar 20 '07 #4

P: n/a
Using "Reports!rpt_top_user!rpt_top_user_sub.Report!ts_o pname.Visible
= False" did the trick.

Thanks for the help.

Mar 20 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.