<p>I have the following situation: I built an Access form with a subform (which records are linked to the records of main form via certain key). When I try to delete any record in the subform, I get the following message: “Access has suspended the action because you and another user tried to change the data” (approximate translation from German). Does anyone know how to delete those records from the subform (and, respectively, from the table behind the form).</p>

[{'answer_id': 34172, 'author': 'samjudson', 'author_id': 1908, 'author_profile': 'https://Stackoverflow.com/users/1908', 'pm_score': 2, 'selected': True, 'text': "<p>If you are currently 'editing' the current form then it will not allow the action. Editing a record can sometimes be triggered by simply clicking inside a field, or other simple actions you wouldn't normally consider 'editing'.</p>\n\n<p>This is usually avoided in Access by using the RunCommand method to undo any edits before deleting the record:</p>\n\n<pre><code>DoCmd.RunCommand acCmdUndo\n</code></pre>\n"}, {'answer_id': 34178, 'author': 'Martin Marconcini', 'author_id': 2684, 'author_profile': 'https://Stackoverflow.com/users/2684', 'pm_score': 0, 'selected': False, 'text': '<p>Also check the "row locking mechanism" that you have. I haven\'t used Access in a while but I remember that you could use set that in the table properties. You can access those properties clicking in the famous "dot" in the upper left corner of the table to bring up its properties. Well if you\'re using Access, you know what I\'m talking about.</p>\n'}, {'answer_id': 67662, 'author': 'David-W-Fenton', 'author_id': 9787, 'author_profile': 'https://Stackoverflow.com/users/9787', 'pm_score': 1, 'selected': False, 'text': '<p>samjudson suggested:</p>\n\n<blockquote>\n  <p>DoCmd.RunCommand acCmdUndo</p>\n</blockquote>\n\n<p>You can also use Me.Undo, to undo the last edit to the form in which the code runs.</p>\n\n<p>Or, Me!MySubForm.Form.Undo to undo the last unsaved edit in the subform whose subform control is named "MySubForm".</p>\n\n<p>You can also use Me!MyControl.Undo to cancel the last edit to a particular control.</p>\n\n<p>"DoCmd.RunCommand acCmdUndo" will apply the Undo operation to the currently selected object, but you won\'t know for sure whether it will apply at the control or form level. Using the commands I suggested completely disambiguates what gets undone.</p>\n\n<p>Keep in mind, though, that Undo will not undo edits to a control after the control\'s AfterUpdate event has fired, or to a form after its AfterUpdate event has fired (i.e., the data has been saved to the underlying data table).</p>\n'}]
['https://Stackoverflow.com/questions/34161', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2717/']