?
Solved

Access 2007 Subreport Visible Problem

Posted on 2009-07-08
2
Medium Priority
?
327 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 2000 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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
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.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Suggested Courses

777 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