Obtaining SubForm Information from Main From
Posted on 2016-11-09
I have a standard Mainform 'frmInstallPayHdr', subform 'frmInstallPaySub' form. They are both bound forms 'tblInstallPayHdr' and 'tblInstal;lPaySub' respectively..
The link between the Main and Subform is InstallPayHdrID which is the unique autonumber primary key assigned to each InstallPlan.
From within 'frmInstallPayHdr' I would like to get a list of all the elements in 'frmInstallPaySub'.
My plan is to pull the list using ADO with a select string something like 'Select * from tblInstallPaySub Where InstallPayHdrID (in sub table) = InstallpayHdrID (in main table) and a loop to read all the returned records.
Is there a better/easier way to get the list of elements in the subform?