dvidal


Hi,

I need to put a validation to a textbox field. I put some code in valid event. But when users enters a wrong value appears a message generated by visual fox pro: "entrada no valida"; How can I disabled this system message and use a messagebox to display my own messages .

When user enters a wrong value, I write that valid event return false.

Thanks,




Re: Valid event

dni


You may put (berfore or in form init):

ON ERROR *

and you will never receive a message error from system or use:

ON ERROR  [Command]
Command may be a small error handler with a messagebox included...






Re: Valid event

CetinBasoz

Use lostfocus instead of valid. ie:

*lostfocus
if this.Value > 10 && sample - assuming as an ivalid value
nodefault
this.SetFocus()
* messagebox("blah blah")
set message to "blah blah"
endif






Re: Valid event

AndyKr

>> How can I disabled this system message and use a messagebox to display my own messages .

SET NOTIFY OFF

Will disable that message






Re: Valid event

Tamar E. Granor

ON ERROR * is almost never a good idea. Hiding errors doesn't cure them.

Tamar