G
Guest
I have been searching for a way to gray out other checkboxes bases on a
single selection. Last week I tried several and none worked. I was even
advised to look into radio buttons but they didn't work either. So far the
message below is the one closest to what I am doing except it does it
backwards!! When I write and place the code as explained below it enables me
to check box one and then it activates box 2 and box 3 instead of
deactivating them!! I am flustered rewriting this one! Any suggestion on
where I going wrong?
Thanks in advance!!
Myron
PREVIOUS MESSAGE I USED BELOW: (it reads from the bottom up)
Yep, I sure did. Sorry about that.
The code works great now. Thank you both, Fred & Marshall.
single selection. Last week I tried several and none worked. I was even
advised to look into radio buttons but they didn't work either. So far the
message below is the one closest to what I am doing except it does it
backwards!! When I write and place the code as explained below it enables me
to check box one and then it activates box 2 and box 3 instead of
deactivating them!! I am flustered rewriting this one! Any suggestion on
where I going wrong?
Thanks in advance!!
Myron
PREVIOUS MESSAGE I USED BELOW: (it reads from the bottom up)
Yep, I sure did. Sorry about that.
The code works great now. Thank you both, Fred & Marshall.
Marshall Barton said:It sounds like you skipped Fred's second step about the
Current event.
--
Marsh
MVP [MS Access]
Ken said:The checkbox fields now work to a point: When I toggle the "master yes/no"
checkbox the others will go gray/black as they should.
However, as I scroll through records, this conditional formatting is not
remembered. That is, I often come to a record where the master yes/no is
"no" but the other boxes are black, or master yes/no is "yes" but the others
are grayed out. It does not remember and automatically interpret the master
yes/no unless it is updated.
Is there a way for the format to be attached to another event that will keep
it each time I go to a new record AND update a current record?
On Fri, 23 Sep 2005 14:50:16 -0700, Ken Cobler wrote:
I have several checkboxes on a Form. The first checkbox is a general yes/no
choice. If the answer is "no" on this checkbox, I would like all the other
checkboxes to be grayed-out. If the answer is "yes", then the other detailed
checkboxes would be black and allow for further yes/no responses.fredg said:First, set the Enabled property of all the check boxes (except the
general one) to No.
Then code the AfterUpdate event of the first check box:
Me![CheckBox2].enabled = Me![CheckBox1]
Me![CheckBox3].enabled = Me![CheckBox1]
Me![CheckBox4].enabled = Me![CheckBox1]
Place the same code in the Form's Current event.