Solved

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

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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
count unique records in access report 2 23
Adding a new record to a SQL Server backend table from Access Form 2 28
data analyst 3 50
Running Total in Access 4 13
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…

920 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