Report, set visible property on Open

Experts, I am trying to set the visible of the field.  Not sure if I have something wrong or if the code should be in detail format.   The code doesnt seem to be firing.  

chkSentPPTSlide visible ppty is set to Yes

thank you.

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)

    If Me.cboPPTNeeded = "No" Then 'cbo has row source "Yes";"No"
        Me.chkSentPPTSlide.Visible = False
        Me.chkSentPPTSlide.Visible = True
    End If
pdvsaProject financeAsked:
Who is Participating?
Scott McDaniel (Microsoft Access MVP - EE MVE )Connect With a Mentor Infotrakker SoftwareCommented:
Are those TEXT values (i.e. "Yes" and "No"), or Boolean values?

If they're boolean, you'd have to do this:

If Me.cboPPTNeeded = False Then

Also, try doing this in the Print event instead of the Format event.
pdvsaProject financeAuthor Commented:
On Print works.  

I also can only see on Print Preview.  

they were text values

Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
I also can only see on Print Preview.  
Do you mean you cannot see it in the "Report" view? If so, that's by design - code doesn't run in Report view.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.