Hi, i have a subform which has to save the introduced data only if both fields of the subform are completed. I have tried:
If field1Completed = False or field2Completed = False Then
DoCmd.CancelEvent
End If
but that prevents the focus moving away to the master form.
I have tried instead, in the Form_AfterUpdate event:
If field1Completed = False or field2Completed = False Then
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
End If
but it gives the error '3179' in running time: "The data base motor stopped the proccess because another user is trying to modify the same data than you at the same time".
Any way of making possible that the subform discards introduced data if any of the two fields isn't completed, and focus move away?
Thanks for any help given.
If field1Completed = False or field2Completed = False Then
DoCmd.CancelEvent
End If
but that prevents the focus moving away to the master form.
I have tried instead, in the Form_AfterUpdate event:
If field1Completed = False or field2Completed = False Then
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
End If
but it gives the error '3179' in running time: "The data base motor stopped the proccess because another user is trying to modify the same data than you at the same time".
Any way of making possible that the subform discards introduced data if any of the two fields isn't completed, and focus move away?
Thanks for any help given.