Solved

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

Posted on 2014-09-16
4
423 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

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

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

831 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