Solved

Access 2007 Subreport Visible Problem

Posted on 2009-07-08
2
315 Views
Last Modified: 2012-05-07
I have a subreport that has three fields:  Score, Result1, Result2
I have a code on the OnLoad event:
Me.Result1.Visible = False
Me.Result2.Visible = False
If Me.Score = 90 Then
    Me.Result2.Visible = True
End If
When the score is 90 then Result2 is visible, this works as expected.  When I move this subreport onto the main report and link it then both fields are visible in PrintPreview.  I have several other subreports with same problem.  It seems that when I move them to the main report me.fieldname.visiblie = false stops working.  Everything  is visible in PrintPreview.  Thanks.
0
Comment
Question by:Sasha42
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 6

Accepted Solution

by:
Yadtrt earned 500 total points
ID: 24807191
Put your code in the main form and change it as following (Replace SubformName with your subform Name

Me.SubformName!Result1.Visible = False
Me.SubformName!Result2.Visible = False
If MeSubformName!Score = 90 Then
    Me.SubformName!Result2.Visible = True
End If
0
 

Author Closing Comment

by:Sasha42
ID: 31601263
Thanks!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question