Hi guys, I have created two tables:
-Model - which has field "Manufacturer Code" and "Model". "Manufacturer Code" is in relation with "Code" in table Manufacturer. I have set this table to have complex primary key: Manufacturer Code, Model
-Variant - with fields "Manufacturer COde", "Model" and "Variant No.". "Manufacturer Code" is in relation with "Manufacturer Code" in table Model. I have set this table to have complex primary key: Manufacturer Code, Model
I wish for a field "Model" in table Variant to fill automatically when I choose manufacturer from dropdown menu so I wrote this code in
Manufacturer Code - OnValidate()
IF ModelRec.GET ("Manufacturer Code")
THEN BEGIN
Model:=ModelRec."Model No.";
END;
where ModelRec is record variable on table Model.
But it doesn't work and I do not know why since I've done this many times.
0
Answers
Rec.Get(PK1,PK2,PK3......);
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/
Franz Kalchmair, MVP
Alias: Jonathan Archer
please like / agree / verify my answer, if it was helpful for you. thx.
Blog: http://moxie4nav.wordpress.com/