Rather complex Visiblity operation

  • Thread starter Thread starter oliaccount via AccessMonster.com
  • Start date Start date
O

oliaccount via AccessMonster.com

Hi
In our system, there is a report that pulls together a parent and a sub
report, however, the details on the sub report are only needed for a
particular catagory (sorted by main report header). How do I go about setting
code that selects visiblity like this?
Thanks!!
 
Hi
In our system, there is a report that pulls together a parent and a sub
report, however, the details on the sub report are only needed for a
particular catagory (sorted by main report header). How do I go about setting
code that selects visiblity like this?
Thanks!!

In the section that holds the subreport (on your main report) use
this code behind the OnFormat event:

if me.headerConditionControl = "Some Condition" then
me.subReportControl.Visible = False
else
me.subReportControl.Visible = True
end if

-Kris
 
Hi
In our system, there is a report that pulls together a parent and a sub
report, however, the details on the sub report are only needed for a
particular catagory (sorted by main report header). How do I go about setting
code that selects visiblity like this?
Thanks!!

In the section that holds the subreport (on your main report) use
this code behind the OnFormat event:

if me.headerConditionControl = "Some Condition" then
me.subReportControl.Visible = False
else
me.subReportControl.Visible = True
end if

-Kris
 
Thanks for the reply Kris

headerConditionControl
Visual Basic doesn't want to recongise this control though. I get this error
on it:
Compile Error
Method or data member not found
I'm running access 2000, by the way.
Cheers!!
 
Thanks for the reply Kris

headerConditionControl
Visual Basic doesn't want to recongise this control though. I get this error
on it:
Compile Error
Method or data member not found
I'm running access 2000, by the way.
Cheers!!

Maybe I should have written:
if <Type Your Boolean Condition In Here. Delete the angle brackets>
then
me.<Type the name of the thing you want to hide/show in here. No
Angle Brackets>.Visible = False
else
me.<Type the name of the thing you want to hide/show in here. No
Angle Brackets>.Visible = True
end if

-Kris
 
Ahh, it works (thumbs up)!
Thanks for your help Kris

While I was checking the report preview, I uncovered another far bigger
problem that I was also able to fix. Good day all round.
 
Ahh, it works (thumbs up)!
Thanks for your help Kris

While I was checking the report preview, I uncovered another far bigger
problem that I was also able to fix. Good day all round.
 
Back
Top