Full Version: Hiding fields on specific page headers
UtterAccess Discussion Forums > Microsoft® Access > Access Reports
coderego
Hi there,
I have a 180 page access report with a report header and a page header. The page header is displaying values based on the query. I would like to manipulate specific fields on the header using VBA, different for each page.
For instance:
On the page header I have Label364 and Text365, Text365 is bound to an item being returned by the query. If Text365 is null, I would like to make Label364 invisible ON THIS SPECIFIC PAGE ONLY! Each other page will have a different value in Text365, some will be null some wont be...so I need some Label364s to be null.
Thanks!
pbaldy
This is untested, but generally you can do that type of thing in the format event of the section containing the controls. Try code in the page header's format event that sets the visibility of the label based on the textbox.
GroverParkGeorge
PMFJI:
One thing that will probably be of great help in managing the hiding and showing of controls will be to give them meaningful names, especially since you want to refer to them specifically. E.g. Me.LblOrderID.Visible is a lot more useful than Me.Label33.Visible, and so on.
George
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.