color coding datasheet

S

SLow

I have a form with a datasheet subform. The main form is used to select the
date to display in the subform and some summary total informtion. It is a
dispatch log for trucks, I would like to be able to change the backcolor on
a text box based on the value of a check box. Both controls are on the
datasheet subform. For example if the box is unchecked, backcolor of Text1 is
is normal 16777215, if the checkbox is checked backcolor of Text1 is 255. I
can get it to work in single form mode, but not in datasheet view. Is this
possible?

TIA
SLow
 
F

fredg

I have a form with a datasheet subform. The main form is used to select the
date to display in the subform and some summary total informtion. It is a
dispatch log for trucks, I would like to be able to change the backcolor on
a text box based on the value of a check box. Both controls are on the
datasheet subform. For example if the box is unchecked, backcolor of Text1 is
is normal 16777215, if the checkbox is checked backcolor of Text1 is 255. I
can get it to work in single form mode, but not in datasheet view. Is this
possible?

TIA
SLow

What version of Access?
If your version supports Conditional Formatting, set the Condition1 to
Expression Is
Write
[CheckBoxName] = -1
in the next box.
Set the control's back color to whatever you want for when it is
checked.
Save the changes.
 
S

SLow

fredg said:
I have a form with a datasheet subform. The main form is used to select the
date to display in the subform and some summary total informtion. It is a
dispatch log for trucks, I would like to be able to change the backcolor on
a text box based on the value of a check box. Both controls are on the
datasheet subform. For example if the box is unchecked, backcolor of Text1 is
is normal 16777215, if the checkbox is checked backcolor of Text1 is 255. I
can get it to work in single form mode, but not in datasheet view. Is this
possible?

TIA
SLow

What version of Access?
If your version supports Conditional Formatting, set the Condition1 to
Expression Is
Write
[CheckBoxName] = -1
in the next box.
Set the control's back color to whatever you want for when it is
checked.
Save the changes.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Thanks Fred. I just converted from 97 to 2002 and did not notice the new conditional formatting option.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top