Subject Re: OnValidateField error
Author Marco Menardi
--- In IBObjects@y..., Nico Callewaert <ncw@t...> wrote:
> 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