?
Solved

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

Posted on 2011-10-27
10
Medium Priority
?
651 Views
Last Modified: 2012-05-12
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
0
Comment
Question by:eossma
  • 6
  • 4
10 Comments
 
LVL 75
ID: 37040578
A check box does not have a foreground or background color.  Only border color.

mx
0
 

Author Comment

by:eossma
ID: 37040657
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
 
LVL 75
ID: 37040686
Yeah ... that pretty much only does anything if you set the Special Effects property to Shadowed ...

mx
0
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 
LVL 75
ID: 37040692
0
 

Author Comment

by:eossma
ID: 37040721
Does "disabled" only work on a Form where the result is a grayed out field?
0
 
LVL 75
ID: 37040762
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
 

Author Comment

by:eossma
ID: 37040887
I was just checking that route.  Through Word, a checkmark symbol = is character code "254".  How would I reference this?
0
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 2000 total points
ID: 37040979
You can do it right on the property sheet - see images


Capture1.gif
Capture2.gif
0
 

Author Closing Comment

by:eossma
ID: 37041049
Thanx!
0
 
LVL 75
ID: 37041071
You are welcome ...

mx
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
If you’re using QODBC to update QuickBooks data from Microsoft® Access but Access is not showing the updated data, you could have set up QODBC incorrectly.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

850 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