Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Access 2007 Subreport Visible Problem

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

618 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