I achieved this by just using the form's Before Update event: if Inspection ID = 0, set Inspection ID = to the main form's Inspection ID. The default value of the field is 0 - so immediately when the form became dirty, it got a 0, and the coming save would set it to the appropriate value.Okay - As you have surmised the InspectionFK in your errors table is surplus to requirements but in your case, if you want to see all the errors for an inspection rather than specific sample related records then it will actually achieve your goal.
Personally I would only want to see the ones related to the sample I had selected in subform1, but I'm not familiar with your business process. It may be seeing all of them gives you a better overview. This may be one of those instances where total normalisation actually causes you more work than it's worth. The only caveat would be how the InspectionID is set in the error record. If there is any possibility for an error in that process you should remove it.
I ended up wrapping it in =IIf([Sample ID]>0,DCount("*","tblErrorDetails","[Sample ID]=" & [Sample ID]),"").Always an issue - You can use something in the vba to hide it
If Me.Newrecord Then ...