Hello,
here is my problem, code I write is working, so purpose of code is to save value in textboxes if TB1 is something inside and if Count (it is define as Timer, so with clicking it rise up + 1, something like For statement), so I can save values in TB only if Count is 0 (it is set up to save empty values in TV, so my database is empty) and to save only if there is something text in TB. But here is problem. I have more one TB which is fill by user, and if fill it (can put only number) with number which is higher then 100, then you cant be able to save, and if is lower then 100, then you can save it.
Thanks to all help.
here is my problem, code I write is working, so purpose of code is to save value in textboxes if TB1 is something inside and if Count (it is define as Timer, so with clicking it rise up + 1, something like For statement), so I can save values in TB only if Count is 0 (it is set up to save empty values in TV, so my database is empty) and to save only if there is something text in TB. But here is problem. I have more one TB which is fill by user, and if fill it (can put only number) with number which is higher then 100, then you cant be able to save, and if is lower then 100, then you can save it.
Thanks to all help.
Code:
Private Sub Save_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Save.Click
If (TextBox1.Text.Length < 1 And Count >= 1) Then
MsgBox("Can not save!", MsgBoxStyle.Information)
Else
Me.Validate()
Me.PopustTabelaBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.Base)
End If
End Sub