on 09-08-2009 7:10 AM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.