Skip to main content

Control Multiple option button

Now if we have multiple option button on one form then how to control all of them.

If we need to add lots of option button on one form then they all will communicate with each other
Means at run time only one option button can be checked.
So the solution to this is to add frames on form and apply option button in frame to group option buttons. any option button out of frame can't communicate with option button inside the frame.
Please comment if this post help you....

Comments

Popular posts from this blog

generate auto ID number

This code will generate auto id number for the unique id. Public Sub id() Dim lastnumber As Long, newnumber As Long 'Check if there are records in the file With recordset If .BOF = True And .EOF = True Then lastnumber = (any number) Else .MoveLast lastnumber = !field in recordset End If 'Generate New Number newnumber = lastnumber + 1 Text1.Text = newnumber End With End Sub please comment if this post helps you.....

Search in Datagrid in vb6.0

You can search item through this code on keypress in datagrid, Like if you press 1 in textbox then all record starts from 1***** will be displayed, without hitting any other button. Private Sub text_change() With recordset If .State adStateClosed Then .Close End If .Open "select * from table where empid like'" & Text1.Text & "%'", con, adOpenDynamic, adLockOptimistic Set DataGrid1.DataSource = recordset End With End Sub comment if this code helps u

Textbox input control in vb6.0

This code will help one to control the input at runtime in vb. All the cases mentioned in this code are the ascii values...... For more customization you can use Private Sub text1_KeyPress(KeyAscii As Integer) If Text2.MaxLength = True Then MsgBox "Can't exceed more than 30 characters" End If Select Case KeyAscii Case Asc(" ") Case 65 To 90 Case 97 To 122 Case 48 To 57 Case 32 Case 13 Case 8 Case 127 Case Else MsgBox "Invalid Input", vbOKOnly + vbExclamation KeyAscii = 0 End Select End Sub