Board index » delphi » Pascal syntax: Accessing the same record of a table on both parent and child forms
Martin Underwood
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Pascal syntax: Accessing the same record of a table on both parent and child formsI think my supplementary question on this thread must have gone astray What I'm trying to do What I'm trying to do is have one form with a dbGrid control that allows I've created Table and Datasource controls on Form1. Form1.dbGrid uses Steve Koterski (Borland database support) suggested placing a DataSource DataSource1.DataSet := Form1.Table1; {link child's dataset to parent's in the child form's OnShow procedure. (I realise that in D2/3, I could Problem However I've still got a problem. The dbEdit fields are blank and won't DBEditAddrSurname.DataField := Form1.AddrTab.AddrTabSURNAME; where: DBEditAddrSurname is a dbEdit control Form1 is the parent form AddrTab is the table object on Form1 AddrTabSURNAME is the corresponding database field, as But this won't compile - it gives "field identifier expected", pointing I think I've set up the USES corrected: Form1.pas has "uses Form2" in What am I doing wrong with my Pascal syntax - I think what I'm doing is |