Error provider Help please.... 
Author Message
 Error provider Help please....

hi, i have a problem , im using this two functions to set an error. my
problem is

when i use the function "ValidateTextBoxObjects" and when the textbox is ""
it puts an error symbol in the textbox, but after i put something in the
textbox i cannot remove the symbol

what im doing wrong ??

thks for the help ...

JSB

Public Function ValidateTextBoxObjects(ByRef TextBox As
System.Windows.Forms.TextBox ) As Boolean

If Textbox.Text ="" then

    GetError(TextBox, "Required")

else

        GetError(TextBox, "")

end if

End Function

Private Sub SetError(ByRef TextBox As Windows.Forms.TextBox, ByVal Msg As
String)

Dim oErrorProvider As New System.Windows.Forms.ErrorProvider()

oErrorProvider.SetError(TextBox, Msg)

End Sub



Sat, 17 Sep 2005 01:29:35 GMT  
 Error provider Help please....
Hello Joao,


Quote:
> when i use the function "ValidateTextBoxObjects" and
> when the textbox is "" it puts an error symbol in the textbox,
> but after i put something in the textbox i cannot remove the
> symbol
[...]
> If Textbox.Text ="" then

>     GetError(TextBox, "Required")

> else

>         GetError(TextBox, "")

> end if

Why GetError?

You need only one Error Provider. Use this code to remove an error
provider icon from a textbox:

\\\
Me.ErrorProvider1.SetError(Me.TextBox1, "")
///

Regards,
Herfried K. Wagner



Sat, 17 Sep 2005 01:54:58 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Provider Error ("Please Help")

2. Provider cannot be found error--HELP PLEASE!!

3. ADO Provider Error ("Please Help")

4. PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP,

5. OLEDB Provider Error - Supplied Provider is different from the one already in use

6. Can anyone HELP me PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE

7. ADO With Jet Provider, Multi User Hell, Please help

8. need help please,adodc provider

9. Please help: Provider does not support Addnew on Disconnected RS

10. Need help diagnosing MSDataShape provider error

11. PLEASE HELP PLEASE HELP PLEASE HELP

12. Error occurred while registering ocx - please, please help.

 

 
Powered by phpBB® Forum Software