You need to save the parent record BEFORE you add child records.
Look at your relationships. As you have tblMaster as the PARENT to tblData, ACCESS won't let you create orphans by adding records to tblData if the parent record (defined by datalinkID) does not exist.
Note on naming conventions. You will want the same field name in the parent and child for relating. MasterID should be the same in both parent and child records. This avoids a LOT of headaches when trying to remember HOW you linked tables together.
Look at your relationships. As you have tblMaster as the PARENT to tblData, ACCESS won't let you create orphans by adding records to tblData if the parent record (defined by datalinkID) does not exist.
Note on naming conventions. You will want the same field name in the parent and child for relating. MasterID should be the same in both parent and child records. This avoids a LOT of headaches when trying to remember HOW you linked tables together.