The Command or Action 'DeleteRecord' isn't available now

  • Thread starter Thread starter EE
  • Start date Start date
E

EE

Good evening,
Having a problem that has just floored me and I do not
know what to do. I have several forms where I have a
button marked 'Delete' that is supposed to delete the
current record after displaying an error message, etc.

DoCmd.SetWarnings False
DoCmd.RunCommand acCmdDeleteRecord
DoCmd.SetWarnings True

The three lines above are the only code besides the error
message that is executed at this point (while trying to
isolate the problem).

The forms options Allow Deletions, Edits, Additions, etc
are all set to yes. The record locks property is set
to "No locks" but I have tried the other options as well.

Another important clue may be that when I open the
database in edit mode or exclusive mode if you want, the
delete button works how I expect it to and the record is
correctly deleted.

What may I be doing wrong?

Please forward any replies to my e-mail account at
(e-mail address removed). Thanks.

Ken.
 
Back
Top