kimprogrammer
Programmer
Hello
Could I get some direction.
I created array of controls. There is an hour textbox, minute combobox and a reason combo box.
I have created handlers and validation for the hour textbox.
Works ok
But now I need to validate a hour,minute and reason combination.
Not quite sure how this works together - I have the code started
'
'validate Hours and reason codes data Entry
'
Private Sub cboAdjReason_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs)
'check if Absents
If (CType(sender, ComboBox).Text) = "ABSENT" Then
IF 'need to check of there is data in hours textbox but it is not cast
MessageBox.Show("testing", "", MessageBoxButtons.OK, MessageBoxIcon.Error)
e.Cancel = True
CType(sender, ComboBox).Text = ""
End If
End If
End Sub
Thanks for the help
Kim
Could I get some direction.
I created array of controls. There is an hour textbox, minute combobox and a reason combo box.
I have created handlers and validation for the hour textbox.
Works ok
But now I need to validate a hour,minute and reason combination.
Not quite sure how this works together - I have the code started
'
'validate Hours and reason codes data Entry
'
Private Sub cboAdjReason_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs)
'check if Absents
If (CType(sender, ComboBox).Text) = "ABSENT" Then
IF 'need to check of there is data in hours textbox but it is not cast
MessageBox.Show("testing", "", MessageBoxButtons.OK, MessageBoxIcon.Error)
e.Cancel = True
CType(sender, ComboBox).Text = ""
End If
End If
End Sub
Thanks for the help
Kim