Hi, I have two TSQLite3Dataset components:
DatasetSales with the fields: Code, Item, Amount, Price, Vendor
DatasetItems with the fields: Code, Description
I have a TDBGrid component that shows the data of DatasetSales.
I want to make a lookup field associated to the Item DatasetSales field to
show the Code and Description DatasetItems fields.
I do it:
Code:
procedure TForm1.FormCreate(Sender: TObject);
begin
with DatasetSales do
begin
Open;
DatasetItems.Open;
FieldByName('Item').FieldKind := fkLookup;
FieldByName('Item').LookupDataSet := DatasetItems;
FieldByName('Item').LookupKeyFields := 'Code; Description';
FieldByName('Item').LookupResultField := 'Code';
end;
end;
but nothing happen.
Why?
Thanks and Merry Christmas.
_______________________________________________
Lazarus mailing list
[email protected]
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus