Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2014-09-16
4
Medium Priority
?
497 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 85
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 2000 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
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…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

916 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