Solved

How to do you display and hide an image on a report in ms access?

Posted on 2014-09-16
4
386 Views
Last Modified: 2014-10-01
I found this code online. The problem I am having is it only works for one image “OLEUnbound218” on the report “Problems_Reports”. I have 4 separate checkboxes that I need to control 4 separate imagers with. Another words, if the checkbox1 is TRUE then image 1 is displayed, and if checkbox2 is TRUE then image 2 is displayed etc…..
The images are on Report named “Problems_Reports” and they look like small triangles.
RC-Ver-2.zip
0
Comment
Question by:cssc1
  • 2
4 Comments
 
LVL 84
ID: 40326787
What code did you find online? You should post it here ...
0
 

Author Comment

by:cssc1
ID: 40326890
Sorry Scott:

Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As Integer)
If Me![Causal_Factor] = True Then
Me![OLEUnbound218].Visible = True
Else
Me![OLEUnbound218].Visible = False
End If
End Sub
0
 

Author Comment

by:cssc1
ID: 40327720
Sorry Scott:

 Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As Integer)
 If Me![Causal_Factor] = True Then
 Me![OLEUnbound218].Visible = True
 Else
 Me![OLEUnbound218].Visible = False
 End If
 End Sub
0
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 500 total points
ID: 40342002
Not sure I understand...?

Are you trying to toggle the controls visibility from the "report" itself?

Try to avoid naming your controls/fields using non alpha-numeric characters, ...it will only cause naming confusion in the VBA editor (and other "Name tracking" features in Access).

I am also confused by the use of a controlsource in these checkboxes that is the same as the illegal Name of the control?


Or if you are simply trying to display or hide the images based on the value already present in the check box fields...?
If so then, I am also confused because the images are in the DetailSection section and your code is on the PageHeaderSection?
Finally, with no records in the source query, ...the checkboxes are all "NULL" to begin with...
Hence there is no True/False value to trigger off of...

Please clarify...

JeffCoachman
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
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 the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

708 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