| re: Deselect a Radio Button at Lotus Note
Orchid wrote:
[color=blue]
> I have 2 fields with Radio button Data Type, and both fields with more
> than one options. On Field1, I want the user to select option1, then
> Field2 is shown and able to select. If the user selects Option2, then
> Field2 is not shown.
>
> I can have the hidden-field working properly. However, after the user
> selected Field1-Option1 and selected an Option on Field2, but cannot
> deselect the option on Field2 if change mind on Field1 selection.
>
> Is there any way to DESELECT the Option in a Radio Button?
>
> Moreover, Can I set an error message on a Computed Field, such as if
> the total isn't equal to 100, then telling user "total must equal 100"?
>
> Your help is greatly appreciated!
>[/color]
I guess you have Frame1 and Frame2...your names may be different In the
Frame1 AfterUpdate event you could have some code like
'sets the visibility of the second option group
Me.Frame2.Visibile = (Me.Frame1 = 1)
'deselect both option1 and option2 in Frame2
Me.Frame2 = 0
Let's say you have Text1 and Text2 And Text3. Text3 contains the sum of
Text1 And Text2. In the AfterUpdate event of Text1 and Text2 you could
have code like
If NZ(Me.Text1,0) > 0 And NZ(Me.Text2,0) > 0 Then
If Me.Text1 + Me.Text2 <> 100 then
msgbox "Not 100"
endif
Endif
You could do it other ways but I'd think you don't want the message to
appear everytime a value is entered...you want the value to appear when
all fields have a value....but it's up to you as to how often you want
the error message to appear. Perhaps the best place to put it is the
BeforeUpdate event of the form. Then you could enter
If Me.Text3 <> 100 then
msgbox "You can't save record unless it equals 100"
Cancel = True
Endif |