Solved

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

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
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…

749 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