G
Guest
Can you please help this amateur.
I have subforms on tabs and since linked by common id (InvNum) they display
and edit fine. I can add a new record to the first tab (jobs) successfully.
I am at a loss as to how to create the related records on adjacent tab for
(labor). All relate to InvNum (key field in each) and are in their own
tables. Job table is related one-to-one to labor, RI enforced, cascade
update/delete is true.
My subforms are DataEntry and Additions = No, so I set to Yes after setting
focus to the subform on the adjacent tab.
Code:
Me![BCfrm].SetFocus
Me![BCfrm].Form.DataEntry = True
Me![BCfrm].Form.AllowAdditions = True
RunCommand acCmdRecordsGoToNew
Me![BCfrm].Form!InvNum = Me![Jobfrm].Form!InvNum
Me![BCfrm].Form!txtholdFocus.SetFocus
DoCmd.Save
Have I entirely missed the boat on this?
I have subforms on tabs and since linked by common id (InvNum) they display
and edit fine. I can add a new record to the first tab (jobs) successfully.
I am at a loss as to how to create the related records on adjacent tab for
(labor). All relate to InvNum (key field in each) and are in their own
tables. Job table is related one-to-one to labor, RI enforced, cascade
update/delete is true.
My subforms are DataEntry and Additions = No, so I set to Yes after setting
focus to the subform on the adjacent tab.
Code:
Me![BCfrm].SetFocus
Me![BCfrm].Form.DataEntry = True
Me![BCfrm].Form.AllowAdditions = True
RunCommand acCmdRecordsGoToNew
Me![BCfrm].Form!InvNum = Me![Jobfrm].Form!InvNum
Me![BCfrm].Form!txtholdFocus.SetFocus
DoCmd.Save
Have I entirely missed the boat on this?