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.
-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.