There are many reasons you might get this message, e.g.:
- The form the button is on is unbound. (For example, if the button is on an
unbound main form.)
- The code is running in an event when the delete cannot take place. (Click
event of a button should be safe, unless it's 'called' from somewhere else.)
- The form's AllowDeletions property is No.
- The form is based on a read-only query.
- The form contains a record that cannot be saved (e.g. required field
missing, or validation rule not met), or is at a new record (so there is no
record to delete.)
- Access security is blocking the delete, or the database is in a folder
where the Windows permissions don't permit deletions, or on a read-only disk
(like a CD.)
etc.