troubleshooting Question

Set visibility of report label based on subreport value

Avatar of gkadell
gkadell asked on
Microsoft Access
11 Comments1 Solution245 ViewsLast Modified:
I thought this would be very quick, but I can't get it right....I have a report "Forecast Accuracy Report Main" with a subreport "Forecast accuracy" (that's the name of the subreport control, the subreport itself if "Forecast Accuracy Subreport").  The subreport has a control called txtCount.  I have labels on the main report and I want to set the visibility of these labels depending on the value in txtCount.  

I was trying to put code in the OnOpen event of the main form:

If Me![Forecast accuracy].report.txtCount>3 then
    lblBias2.visible=true
if me![Forecast accuracy].report.txCount>6 then
    lblBias3.visible=true
If me![Forecast accuracy].report.txtCount>9 then
     lblBias4.visible=true
end if

However, I can't get VBA to come up with lblBias2.visible, visible is not in the list of options that VBA gives me.

Also, am I correctly referencing txtCount?

Let me know if you need clarification.

Gladys

ASKER CERTIFIED SOLUTION
ComTech

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 11 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 11 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros