MS Access Force checkbox field on report to be gray if checkbox = true

Is there a ways to force the color of a checkbox on a report to be gray if the checkbox is true?

I've tried this, but this doesn't work:
Private Sub Report_Current()

If Me.Purge Then
  Me.Purge.Enabled = False
End If

End Sub

I've also tried:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
   
    If [Purge] = True Then
        'Me.[Purge].Enabled = False
        [EMPname].ForeColor = RGB(150, 150, 150)
        [Title].ForeColor = RGB(150, 150, 150)
        [CourseDateE].ForeColor = RGB(150, 150, 150)

    Else
        'Me.[Purge].Enabled = True
        [EMPname].ForeColor = vbBlack
        [Title].ForeColor = vbBlack
        [CourseDateE].ForeColor = vbBlack
    End If
End Sub
eossmaAsked:
Who is Participating?
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Connect With a Mentor Database ArchitectCommented:
You can do it right on the property sheet - see images


Capture1.gif
Capture2.gif
0
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
A check box does not have a foreground or background color.  Only border color.

mx
0
 
eossmaAuthor Commented:
So, I tried to change the border color to gray as well like

[Purge].bordercolor = RGB(150, 150, 150)

but it didn't do anything.
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
Yeah ... that pretty much only does anything if you set the Special Effects property to Shadowed ...

mx
0
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
0
 
eossmaAuthor Commented:
Does "disabled" only work on a Form where the result is a grayed out field?
0
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
Correct.  There is no disabled property for a check box on a report.

You know you can ... use either a label or text box ... and pick a check mark symbol as the 'text' ... then you will have full cosmetic control over it ....

mx
0
 
eossmaAuthor Commented:
I was just checking that route.  Through Word, a checkmark symbol = is character code "254".  How would I reference this?
0
 
eossmaAuthor Commented:
Thanx!
0
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
You are welcome ...

mx
0
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.