![]() ![]() If txtFDescription.Text = String.Empty ThenĮrrorProvider1. An alternative to the ErrorProvider is to provide an errLabel to the. Private Sub txtFDescription_Validating(sender As Object, e As ) Handles txtFDescription.Validating ErrorProvider, that component will be used to flag validation errors to the user. 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") 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) If (sConn.State = ConnectionState.Closed) Then I try to display the text in the red rectangle into my ErrorProvider1 SetError (control, value) function. Private Sub btnFSave_Click(sender As Object, e As EventArgs) Handles btnFSave.Click See the following labels attributes below. I am sorry for saying these words but something does not work expected. ![]()
0 Comments
Leave a Reply. |