cancel
Showing results for 
Search instead for 
Did you mean: 

Group Option Button

Former Member
0 Kudos

Hi.....

I have created a form using screen painter. In that i have placed 3 option buttons. I want the user should select only one from 3. But here now all the three are selected. At the same time, i have a database field to store this value. So if a user selects any one from the three, it should be updated in the database.

thank you!!

Roseline Christina.B

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Roseline,

Points you need to remember while using a radio button are,

1. You need to bind it first

2. Group all the 3 or 4... radio buttons.

On doing so, one option can only be selected at a time and that will accordingly be updated in the db.

A quick snippet for reference is below.

objOption = objForm.Items.Item("rdbAdd").Specific
            objOption.DataBind.SetBound(True, "", "opt1")

            objOption = objForm.Items.Item("rdbSub").Specific
            objOption.DataBind.SetBound(True, "", "opt2")
            objOption.GroupWith("rdbAdd")

            objOption = objForm.Items.Item("rdbMul").Specific
            objOption.DataBind.SetBound(True, "", "opt3")
            objOption.GroupWith("rdbAdd")

            objOption = objForm.Items.Item("rdbDiv").Specific
            objOption.DataBind.SetBound(True, "", "opt4")
            objOption.GroupWith("rdbAdd")

Hope this helps.

Regards,

Satish.