Validating fields

Hi,

I have following code in OnValidate event in a form

if ({txtassetcategory} = ‘0000’)
{
sc_error_message(“asset category cannot be empty”);
sc_error_exit();
}

when an error occurs the form switches to edit mode and empty all other fields values instead of remaining on the same insert mode !

any idea how to fix it ?

cheers

Re: Validating fields

see : sc_exit(ref) instead. There are other variations of sc_exit as well. You do not want interrupt your script as sc_error_exit does.

Regards,
Scott.