I am building a database for a school project. The database contains forms frmDemographics and frmHealthInfo and they are linked to tblDemographics and tblHealthInfo, respectively. tblDemographics store patients information while tblHealthInfo store information about how they search for health related information. Both tables have subjectID as the primary key and it links these two tables together. I would like to add new patient in frmDemographics and when I go to frmHealthInfo, I would like SubjectID from frmDemogrphics to be passed to frmHealthInfo automatically. How can this be done? I tried to add following code under Onload and it didn't work:
Me.SubjectID = Forms!frmDemographics!SubjectID
Me.SubjectID = Forms!frmDemographics!SubjectID