?
Solved

CheckBox Properties change by Event

Posted on 2004-04-08
4
Medium Priority
?
196 Views
Last Modified: 2012-05-04
Is there a way to change the background color of the "box" in the checkbox object based on an event?
0
Comment
Question by:gpotenza
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 10

Accepted Solution

by:
perkc earned 1000 total points
ID: 10785423
I don't believe that checkbox background colors can be changed at all. You could however put a label underneath the checkbox and change the label's color based on an event. You would just need to bring the checkbox to the from to make sure it's on top of the label.

Changing the label's color would be:

Me.LabelName.BackColor = 10079487 ' Numeric value to indicate the color

perkc
0
 
LVL 12

Expert Comment

by:nexusnation
ID: 10785498
I agree with perkc.

You could also go as far as using a label with a bolded X as the checkbox, which toggles the checkbox that would be hidden underneath.

It could be as simple as:

Private Sub label1_Click()
Select Case Me.checkbox
Case True
Me.label1.Caption = "X"
Me.label1.Forecolor = vbGreen
Case False
Me.label1.Caption = ""
Me.lbl1.Forecolor = vbRed
End Select
End Sub

Or, to make it simplier, just use the red and green for off and on, and forget about the label's caption of "X". It would look pretty good too.

Andrew
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

765 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