Subject | Re: OnvalidateField error |
---|---|
Author | Nico Callewaert |
Post date | 2002-11-20T14:49:06Z |
Hi again Marco,
Hi Marco,
That's the way I'm doing it, but in that event, I assign a value to
another field. Here's the code :
if AField.FieldName = 'MASTERNO' then
begin
if Trim (AField.AsString) <> '' then
// Get the default language for this master
with crCust do
begin
Active := False;
if not Prepared then Prepare;
Params [0].AsString := Copy (AField.AsString, 1, 5);
Active := True;
First;
if not Eof then
ARow.ByName ('LANGUAGE').AsString :=
FieldByName('LANGUAGE').AsString;
end;
end;
My customer is lazy :-), so I'm providing him with a default value for
the language.
Nico
Hi Marco,
That's the way I'm doing it, but in that event, I assign a value to
another field. Here's the code :
if AField.FieldName = 'MASTERNO' then
begin
if Trim (AField.AsString) <> '' then
// Get the default language for this master
with crCust do
begin
Active := False;
if not Prepared then Prepare;
Params [0].AsString := Copy (AField.AsString, 1, 5);
Active := True;
First;
if not Eof then
ARow.ByName ('LANGUAGE').AsString :=
FieldByName('LANGUAGE').AsString;
end;
end;
My customer is lazy :-), so I'm providing him with a default value for
the language.
Nico