The downside of my celebrity is that I cannot go anywhere in the world without being recognized. It is not enough for me to wear dark sunglasses and a wig. The wheelchair gives me away.
The tricky thing with reports in Access is that they don't behave like forms. When Access generates a report, it renders the subreports first. So by the time any events fire in the parent report, the subreports are already finished rendering. That means you can't dynamically change something like a textbox in a subreport's header from the parent report at runtime.
If you need to control the visibility of a control inside a subreport, the best approach is to have the logic handled inside the subreport itself, or pass in the needed values before the report is opened. One way to do this is to place the controlling values on a form and reference them directly in your report (for example, =Forms!MyForm!SomeValue). Another option is to open the report using VBA and pass parameters using OpenArgs, then have the report read those on load.
You might even consider opening a hidden form in the background just to hold the values the report needs.
This kind of behavior often trips people up, and honestly it might make for a good TechHelp video. I'll add it to my list.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Visitor Forum.