

Private Sub txtFDescription_Validating(sender As Object, e As ) Handles txtFDescription.Validating

#Visual studio errorprovider example zip#
Private Sub txtZipCode_Validating(sender As Object, e As ) Handles txtZipCode.ValidatingĮrrorProvider1.SetError(txtZipCode, "Provide a valid zip code!") If I click on the save button and trigger the event of button control causes ValidateChildren() once for txtFDescription.text validating not the other 4 more validating controls.It means if provide a valid data in txtFDescription and then click on the save button one more but ValidateChildren does not work after once usage as interestingly even I could not provided data for the other 4 controls. MessageBox.Show("You must check some controls that whether input or not " & vbCrLf & "because program needs those controls provided data")

error messages from possible errors from previous transactions for the Error Provider control. Switch() ' to set switchValue's value true=1 false=0īeforeSave() ' checking some controls before savingĭim strInsert As String = "INSERT INTO tbFirm VALUES(" & intInputInterest.Text & " ,'" & Format(Me.dtpAgreement.Value, "yyyy-MM-dd") & "') SELECT SCOPE_IDENTITY() AS nFirmID"ĭim SqlCmdForTbFirm As New SqlCommand(strInsert, sConn)ĭim getReturnFirmID As Short = CShort(SqlCmdForTbFirm.ExecuteScalar())ĭim strInsertGroups As String = "INSERT INTO tbFirmGroups VALUES(" & getReturnFirmID & ",'" & txtBtnFGrp1.Text & "')"ĭim SqlCmdForTbFirmGroups As New SqlCommand(strInsertGroups, sConn) Starting out with > Visual C - Calories from Fat. If (sConn.State = ConnectionState.Closed) Then Private Sub btnFSave_Click(sender As Object, e As EventArgs) Handles btnFSave.Click I am sorry for saying these words but something does not work expected.
