Solved

Access 2007 Subreport Visible Problem

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

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…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

895 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

12 Experts available now in Live!

Get 1:1 Help Now