Hi Everyone,
I am trying to improve my code by making it more readible. The following code works, but it is certainly not the most efficient way. I`m trying to write a loop to make certain elements in an Access report visible/invisible, but I can`t address the visibility property of these items while iterating over i. I`m sure it's rather simple, but I simply can't solve it. Thanks!
I am trying to improve my code by making it more readible. The following code works, but it is certainly not the most efficient way. I`m trying to write a loop to make certain elements in an Access report visible/invisible, but I can`t address the visibility property of these items while iterating over i. I`m sure it's rather simple, but I simply can't solve it. Thanks!
Code:
DoCmd.OpenReport "tblInterval subreport", acViewDesign, , , acHidden
Reports![tblInterval subreport]!BoxInsp1.Visible = False
Reports![tblInterval subreport]!BoxInsp2.Visible = False
Reports![tblInterval subreport]!BoxInsp3.Visible = False
Reports![tblInterval subreport]!BoxInsp4.Visible = False
Reports![tblInterval subreport]!BoxInsp5.Visible = False
Reports![tblInterval subreport]!BoxInsp6.Visible = False
Reports![tblInterval subreport]!BoxInsp7.Visible = False
Reports![tblInterval subreport]!BoxInsp8.Visible = False
Reports![tblInterval subreport]!BoxInsp9.Visible = False
Reports![tblInterval subreport]!BoxInsp10.Visible = False
DoCmd.Close acReport, "tblInterval subreport", acSaveYes