Subject Re: Field Intercepts?
Author gsndelphicoder
--- In IBObjects@yahoogroups.com, "Roger Vellacott" <rvellacott@...>
wrote:
>
> Something like this.
>
>
>
> In your system initialisation, create an array of user names and their
> numbers.
>
>
>
> Procedure MyQueryAfterOpen(Dataset:TDataset);
>
> Begin
>
> Dataset.FieldByname('USER_NR').OnGetText :=
> SomeDataModule.UserGetText;
>
> End;
>
>
>
> Procedure SomeDataModule.UserGetText(Field:TField);
>
> Begin
>
> With Field do
>
> . DisplayText := UserNames[AsInteger];
>
> End;
>
>
>
> Roger Vellacott
>
> Passfield Data Systems Ltd
>
>
>

Thank You Roger!

That worked except that I had to change the UserGetText declaration to:

procedure SomeDataModule.UserGetText(Field: TField; var Text: String;
DisplayText: Boolean);
begin

Text := UserNames[Field.AsInteger];
DisplayText := True;

end;