hi
i do a little check before run code
after i check the result
when this code run, i get:
Run-time error '2185'
You can't reference a property or method for a control unless the control has the focus
what is the correct way to validate user input?
any idea?
thanks
i do a little check before run code
Code:
Public Function validationValue() As Boolean
If lstTransit.ItemsSelected.Count > 0 And txtDate.Text <> "" And txtHeureDebut.Text <> "" And txtHeureFin.Text <> "" Then
validationValue = True
Else
validationValue = False
End If
End Function
after i check the result
Code:
Dim fctReturnn As Boolean
fctReturnn = validationValue
If fctReturnn = True Then
..
else
msgbox "erreur..."
endif
when this code run, i get:
Run-time error '2185'
You can't reference a property or method for a control unless the control has the focus
what is the correct way to validate user input?
any idea?
thanks