Hi! 
Basically i have a Warranty Claim System. In the main form there is a subform called Warranty Claim Details which gives the details for each claim. Each claim corresponds to a specific Warranty ID. So basically each warranty ID(which is on the main form) has multiple entries in the subform.
Currenty I have 2 different VBA codes.
The first one allows me to delete the record in the main form. But the values are not deleted in the subform when i open it separately.
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
The second one allows me to delete the entries in the sub-form one by one but does not delete the main record ie in the main form.
Private Sub DELETE_Click()
On Error GoTo Err_DELETE_Click
Me.[Warranty Claim Detail Subform].SetFocus
With Me.[Warranty Claim Detail Subform]
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
End With
What i need is that when i click the delete button on the main form, all the entries in the subform as well as the main entry gets deleted!
Please Please Please help...
I've been stuck on this for days...
Thanks
Basically i have a Warranty Claim System. In the main form there is a subform called Warranty Claim Details which gives the details for each claim. Each claim corresponds to a specific Warranty ID. So basically each warranty ID(which is on the main form) has multiple entries in the subform.
Currenty I have 2 different VBA codes.
The first one allows me to delete the record in the main form. But the values are not deleted in the subform when i open it separately.
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
The second one allows me to delete the entries in the sub-form one by one but does not delete the main record ie in the main form.
Private Sub DELETE_Click()
On Error GoTo Err_DELETE_Click
Me.[Warranty Claim Detail Subform].SetFocus
With Me.[Warranty Claim Detail Subform]
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
End With
What i need is that when i click the delete button on the main form, all the entries in the subform as well as the main entry gets deleted!
Please Please Please help...
Thanks