dating your step sibling - Validating event radio group

In the following example, let us create two groups of radio buttons and use their Checked Changed events for changing the Back Color and Fore Color property of the form. Red End Sub Private Sub Radio Button2_Checked Changed(sender As Object, _ e As Event Args) Handles Radio Button2.

Let's double click on the radio buttons and put the follow code in the opened window. Text = "" End Sub Private Sub Radio Button1_Checked Changed(sender As Object, _ e As Event Args) Handles Radio Button1.

validating event radio group-12

If the e-mail address is not in the standard format (containing "@" and "."), the validation fails, an Error Provider icon is displayed, and the event is canceled.

This example requires that a Text Box and Error Provider control have been created on a form.

This can be in the click event for a button that saves the current record, etc.

If is false, trigger whatever user notifications you need to.

The name field determines which group that a particular button belongs to.

The value that will be passed for a specific group when the form is submitted will be the value of the button within the group that is selected at the time that the form is submitted.

Microsoft is conducting an online survey to understand your opinion of the Msdn Web site.

If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.

The difficulty with radio buttons is that there are at least two and usually more fields that need to be placed on the form, related together and tested as one group.

Tags: , ,