Access 2000; Can't delete

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Receive a message when running a delete query as follows: Can't delete 0
records in the delete query due to key violations and 1 record due to lock
violations. The query is iniated from an Access 2000 form automaically when
the form is closed. The message occurs every time the form is closed.

What causes the message to appear?
What is the remedy?
 
What causes the message to appear?

It would appear that you're attempting to delete the record which is
currently being edited on the form. Access can't do so, since (as far
as it can tell) you're still using that record.
What is the remedy?

If you are indeed (oddly, not sure why you would do this) always
deleting the record that you just entered or edited, do so directly on
the Form:

DoCmd.RunCommand acCmdDeleteRecord

rather than running a Delete query.

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
Back
Top