Function For Validation Each Fields( Numeric Or Empty)
Private Function Validat(ByRef Target As Integer, _
ByRef HighestBSL As Integer, _
ByRef LowestBSL As Integer, _
ByRef HighestA1c As Integer, _
ByRef LowestA1c As Integer, _
ByRef Remarks As String _
) As Boolean
Dim isvalidat As Boolean = False
If Target = 0 Or txtTarget.Text = String.Empty Or Not IsNumeric(txtTarget.Text) Then
MessageBox.Show("Enter Target Sugar Management Plan Or Enter Numeric Only", "Try Again", MessageBoxButtons.OK, MessageBoxIcon.Warning)
txtTarget.Focus()
isvalidat = False
ElseIf HighestBSL = 0 Or txtHighestBSL.Text = String.Empty Or Not IsNumeric(txtHighestBSL.Text) Then
MessageBox.Show("Enter Highest blood sugar level Or Enter Numeric Only", "Try Again", MessageBoxButtons.OK, MessageBoxIcon.Warning)
txtHighestBSL.Focus()
isvalidat = False
ElseIf LowestBSL = 0 Or txtLowestBSL.Text = String.Empty Or Not IsNumeric(txtLowestBSL.Text) Then
MessageBox.Show("Enter Lowest blood sugar level Or Enter Numeric Only", "Try Again", MessageBoxButtons.OK, MessageBoxIcon.Warning)
txtLowestBSL.Focus()
isvalidat = False
ElseIf HighestA1c = 0 Or txtHighestA1c.Text = String.Empty Or Not IsNumeric(txtHighestA1c.Text) Then
MessageBox.Show("Enter Highest A1c level Or Enter Numeric Only", "Try Again", MessageBoxButtons.OK, MessageBoxIcon.Warning)
txtHighestA1c.Focus()
isvalidat = False
ElseIf LowestA1c = 0 Or txtLowestA1c.Text = String.Empty Or Not IsNumeric(txtLowestA1c.Text) Then
MessageBox.Show("Enter LowestA1c level Or Enter Numeric Only", "Try Again", MessageBoxButtons.OK, MessageBoxIcon.Warning)
txtLowestA1c.Focus()
isvalidat = False
ElseIf Remarks = String.Empty Then
MessageBox.Show("Enter Remarks ", "Try Again", MessageBoxButtons.OK, MessageBoxIcon.Warning)
txtRemarks.Focus()
isvalidat = False
Else
isvalidat = True
End If
Return isvalidat
End Function
sa sunod try nako nah
heheheh...
hehehehe...try lng na!!
hehehehe...try lng na!!
hehehehe...try lng na!!