Re: One check box or the other
- From: "Rick B" <Anonymous>
- Date: Thu, 20 Jul 2006 10:10:23 -0500
Just FYI, you can do what you are asking but, I have had a case in the past
where I used a triple-state checkbox. Perhaps this will suit your needs.
You change the field to a number field and it stores "-1" for a checked
value, "0" for an unchecked value, and Null for a grayed out checkbox.
Again, this may or may not make sense for your particular application, but
it worked very well for us where we had an activity that was either
performed, not yet performed and required, or not yet performed and
optional.
--
Rick B
"BruceM" <bamoob@xxxxxxxxxxxxxxxxxx> wrote in message
news:%23L40gxArGHA.1368@xxxxxxxxxxxxxxxxxxxxxxx
I have a form on which are two check boxes (bound to Yes/No fields) that
cannot both be the same value. Under some circumstances neither will be
checked, so I don't think I can use an option group unless I add a third
option, which I don't want to do.
I know I can add this to one check box (and the inverse to the other):
Private Sub Check1_AfterUpdate()
Me.Check2 = Not Me.Check1
End Sub
However, I would like to know if I could handle both check boxes from a
single function (or sub), or otherwise streamline the process. The code
above, if placed in a function and called from the After Update event,
affects one check box differently than the other. I could write an If
statement to take care of both check boxes, but I wouldn't be saving
myself much coding.
My actual situation involves several pairs of check boxes, and other cases
in which a similar principle applies. It comes up often enough that I
would like to know if there is a way to handle it more efficiently.
.
- Follow-Ups:
- Re: One check box or the other
- From: BruceM
- Re: One check box or the other
- References:
- One check box or the other
- From: BruceM
- One check box or the other
- Prev by Date: Re: Error in INSERT TO Statement
- Next by Date: Date Query
- Previous by thread: One check box or the other
- Next by thread: Re: One check box or the other
- Index(es):
Relevant Pages
|
Loading