Subject | REpost: OnValidateField I want field not blanked if wrong |
---|---|
Author | mmenaz |
Post date | 2001-12-14T13:12:11Z |
Sorry for re-posting, but I think that someone knows the answer, just
not noticed the question ;))
I've a code like:
if (AField.FieldName = 'CUSTOMER_CODE') then
begin
if not IsCustCodeOk(AField.AsString) then
raise Exception.Create( 'WRONG customer code' );
end;
When the error raises, the focus is put back to the offending
control, but the field is blanked, making hard for the user to check
and correct the long, maybe almost 99% correct, code.
How can I have the field value preserved?
Thanks
Marco Menardi
not noticed the question ;))
I've a code like:
if (AField.FieldName = 'CUSTOMER_CODE') then
begin
if not IsCustCodeOk(AField.AsString) then
raise Exception.Create( 'WRONG customer code' );
end;
When the error raises, the focus is put back to the offending
control, but the field is blanked, making hard for the user to check
and correct the long, maybe almost 99% correct, code.
How can I have the field value preserved?
Thanks
Marco Menardi