Only one check box at a time

G

Guest

I have a series of check boxes ([30Days'Notice], [60Days'Notice],
[90Days'Notice])for which I have written an After Update event. When one of
the boxes is checked, the date on which notice must be sent ([NoticeByDate])
is automatically calculated and filled in based on the date entered in
another control, [CurrentTermExp].

I would like to add a function to the AfterUpdate event so that the check
boxes work kind of like a Control Group: when one is true, both of the others
are automatically made false, whatever their value. I realize it would
probably make more sense to set up the check boxes AS a Control Group and
have the value stored in ONE underlying field, but this has presented a
couple of problems for me: 1) it seems like once I click on a check box, I
can't go back to having NONE of the boxes checked, and I need it to be
possible for all of the check boxes to be false; and 2) I can't get the
auto-fill function for [NoticeByDate] to work with a control group.

I guess if someone could explain to me how to solve these problems, I'd be
happy to convert the check boxes to a Control Group. But otherwise, can
someone help me figure out to write the After Update event that will make the
check boxes work kind of like a Control Group?

Here's what I have, for example, as the After Update event procedure under
[30Days'Notice]:

If Not IsNull([CurrentTermExp]) And [30Days'Notice] = True Then
Me![NoticeByDate] = DateAdd("m", -1, [CurrentTermExp]) And
Me![60Days'Notice] = False And Me![90Days'Notice] = False
End If

Any suggestions would be greatly appreciated!
 
G

Guest

Go ahead and create the option group. Check boxes are okay, but if it were
me, I would change them to option buttons. Set each button with its own
option value, you could use 30, 60, and 90 or 1,2,3, whatever. Then make the
Default Value of the option group Null. Now, in the Current event of the
form:
Me.opgNoticeDays = Null
That will reset it to Null for each record.
If you want to reset it manually, add a command button and put the above
line of code in the Click event.

Tell me more about your auto fill function in [NoticeByDate]. I think we
can fix that, too.
 

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