Checkbox Formatting

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am currently working on a database that contains information about
machinery inspections. There are 2 checkboxes for each shift showing that an
inspection has been done. If neither checkbox during a shift is checked, I
would like the checkboxes to turn red (but only if neither box is checked).
How can I write an expression that will make this happen?

Thanks in advance for your help!

Jen
 
Yes, i'm interested too because I think it can not be done... the formatting
optiosn for textboxes ar very limited besides the fact that you can make the
border red or something like that.
 
If you're having difficulty formatting the checkbox itself, an alternative
would be to surround the boxes with a red rectangle that is not visible. If
you then detect that both checkboxes are unchecked, you could change the
rectangle's visible property to true, etc. This would be done during form
open (or load) and would need to be done again in the onchange event for
each of the checkboxes.

Of course, this only works if those checkboxes are somewhat close to one
another on the form.

Bob
 
In a form or report?

For a report, see:
Format Check boxes on reports: size, color, unbox, conditionally format
at:
http://allenbrowne.com/ser-52.html

It's not quite a simple for a form where you need to be able to enter the
data (i.e. the check boxes must be editable), but it can be done. You could
place the conditionally formatted text boxes on top of the check boxes. In
the Got Focus event, SetFocus to the real check box behind it. Set the tab
order of the text boxes correctly, and set the Tab Stop property of the
check boxes to No. Use Conditional Formatting (on the Format menu in form
design) to make them turn red by using an expression such as:
[Check1] + [Check2] = 0

(Conditional formatting requires Access 2000 or later.)
 
Thank you all very much for the assistance! I appreciate it very much!
--
J. Shafer
AWP Industries, Inc.


Allen Browne said:
In a form or report?

For a report, see:
Format Check boxes on reports: size, color, unbox, conditionally format
at:
http://allenbrowne.com/ser-52.html

It's not quite a simple for a form where you need to be able to enter the
data (i.e. the check boxes must be editable), but it can be done. You could
place the conditionally formatted text boxes on top of the check boxes. In
the Got Focus event, SetFocus to the real check box behind it. Set the tab
order of the text boxes correctly, and set the Tab Stop property of the
check boxes to No. Use Conditional Formatting (on the Format menu in form
design) to make them turn red by using an expression such as:
[Check1] + [Check2] = 0

(Conditional formatting requires Access 2000 or later.)
 
Allen,

I'm having trouble following your instructions on your website about this
problem. Access won't allow me to type into the Format field of the text box
while (whilst?) holding down the ALT key. Any idea what I'm doing wrong? I'm
using Access 2003, if that makes any difference.

Thanks

Kate

Allen Browne said:
In a form or report?

For a report, see:
Format Check boxes on reports: size, color, unbox, conditionally format
at:
http://allenbrowne.com/ser-52.html

It's not quite a simple for a form where you need to be able to enter the
data (i.e. the check boxes must be editable), but it can be done. You could
place the conditionally formatted text boxes on top of the check boxes. In
the Got Focus event, SetFocus to the real check box behind it. Set the tab
order of the text boxes correctly, and set the Tab Stop property of the
check boxes to No. Use Conditional Formatting (on the Format menu in form
design) to make them turn red by using an expression such as:
[Check1] + [Check2] = 0

(Conditional formatting requires Access 2000 or later.)
 
If you can't type into the Format property (in the Properties box), you
should be able to select the character you want on the web page, copy, and
paste it into the Format property.

That's generally what I do.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

kt2902 said:
Allen,

I'm having trouble following your instructions on your website about this
problem. Access won't allow me to type into the Format field of the text
box
while (whilst?) holding down the ALT key. Any idea what I'm doing wrong?
I'm
using Access 2003, if that makes any difference.

Thanks

Kate

Allen Browne said:
In a form or report?

For a report, see:
Format Check boxes on reports: size, color, unbox, conditionally
format
at:
http://allenbrowne.com/ser-52.html

It's not quite a simple for a form where you need to be able to enter the
data (i.e. the check boxes must be editable), but it can be done. You
could
place the conditionally formatted text boxes on top of the check boxes.
In
the Got Focus event, SetFocus to the real check box behind it. Set the
tab
order of the text boxes correctly, and set the Tab Stop property of the
check boxes to No. Use Conditional Formatting (on the Format menu in form
design) to make them turn red by using an expression such as:
[Check1] + [Check2] = 0

(Conditional formatting requires Access 2000 or later.)

jenatawp said:
I am currently working on a database that contains information about
machinery inspections. There are 2 checkboxes for each shift showing
that
an
inspection has been done. If neither checkbox during a shift is
checked,
I
would like the checkboxes to turn red (but only if neither box is
checked).
How can I write an expression that will make this happen?

Thanks in advance for your help!

Jen
 
Back
Top