Avatar of chaticathe
chaticathe

asked on 

Display image in MS Access Report based on value of action item field for each record

I want to display the image of a star for each action item record that has a value of 0 in a report. The star should display in place of the 0. The records are contained in a subform on the report.  This is the code that I have but it is not working. It currently displays a star for each record.

The code is located in the Detail Format on the main form.  

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me!Mitigation_Events_Subreport.Form!Action_No = 0 Then
   
    Me!Mitigation_Events_Subreport.Form!Star.Visible = True
    Me!Mitigation_Events_Subreport.Form!Action_No.Visible = False
Else
    Me!Mitigation_Events_Subreport.Form!Star.Visible = False
    Me!Mitigation_Events_Subreport.Form!Action_No.Visible = True
End If
End Sub
Microsoft Access

Avatar of undefined
Last Comment
Jim Dettman (EE MVE)
ASKER CERTIFIED SOLUTION
Avatar of Jim Dettman (EE MVE)
Jim Dettman (EE MVE)
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Microsoft Access
Microsoft Access

Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.

226K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo