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
chaticatheAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
That code has to go in the sub report, OnFormat event of the detail

Jim.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.