Subject | Re: OnValidateField error |
---|---|
Author | Marco Menardi |
Post date | 2002-11-20T14:39:15Z |
--- In IBObjects@y..., Nico Callewaert <ncw@t...> wrote:
IB_Query OnValidateField, as far as I understand.
Inside the event you have to check for the proper field value to test.
I've remembered that I use that event in my program, and my code is
like this:
...
if (AField.FieldName = 'CODICE_FISCALE') then
begin
if not ControlloCFPIVA(AField.AsString) then
raise Exception.Create( 'Codice Fiscale WRONG' );
end
...
this should be the correct way ;)
regards
Marco Menardi
> Hi Marco,cut
>
> I will try to check if the field is assigned.check if ANY field is assigned. Every field assignment fires the
IB_Query OnValidateField, as far as I understand.
Inside the event you have to check for the proper field value to test.
I've remembered that I use that event in my program, and my code is
like this:
...
if (AField.FieldName = 'CODICE_FISCALE') then
begin
if not ControlloCFPIVA(AField.AsString) then
raise Exception.Create( 'Codice Fiscale WRONG' );
end
...
this should be the correct way ;)
regards
Marco Menardi