Solved

Access 2007 Subreport Visible Problem

Posted on 2009-07-08
2
285 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
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

707 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now