By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,504 Members | 1,448 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,504 IT Pros & Developers. It's quick & easy.

Help

P: n/a
Hi,
DoCmd.RunCommand acCmdDeleteRecord
raises error: 2046 The command or action 'DeleteRecord' isn't available
now.
Why could it be?
Thanks
Nov 13 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
from menu it is deleted without any problem

"DebbieG" <de*****@NOSPAM.NOSPAM> wrote in message
news:%2***************@TK2MSFTNGP15.phx.gbl...
I think it's because you can't delete a blank record.

You might want to just trap this error.
"Igor" <Ig*********@sasktel.net> wrote in message
news:11*************@corp.supernews.com...
| Hi,
| DoCmd.RunCommand acCmdDeleteRecord
| raises error: 2046 The command or action 'DeleteRecord' isn't available
| now.
| Why could it be?
| Thanks

Nov 13 '05 #2

P: n/a
I think it's because you can't delete a blank record.

You might want to just trap this error.
"Igor" <Ig*********@sasktel.net> wrote in message
news:11*************@corp.supernews.com...
| Hi,
| DoCmd.RunCommand acCmdDeleteRecord
| raises error: 2046 The command or action 'DeleteRecord' isn't available
| now.
| Why could it be?
| Thanks

Nov 13 '05 #3

P: n/a
from menu it is deleted without any problem

"DebbieG" <de*****@NOSPAM.NOSPAM> wrote in message
news:%2***************@TK2MSFTNGP15.phx.gbl...
I think it's because you can't delete a blank record.

You might want to just trap this error.
"Igor" <Ig*********@sasktel.net> wrote in message
news:11*************@corp.supernews.com...
| Hi,
| DoCmd.RunCommand acCmdDeleteRecord
| raises error: 2046 The command or action 'DeleteRecord' isn't available
| now.
| Why could it be?
| Thanks

Nov 13 '05 #4

P: n/a
Igor,

Are you running this code in the Click event of a button? If so, is there
any other code in that event? Where is the button located, is it on the form
you are trying to delete the record from?

--
Wayne Morgan
MS Access MVP
"Igor" <Ig*********@sasktel.net> wrote in message
news:11*************@corp.supernews.com...
Hi,
DoCmd.RunCommand acCmdDeleteRecord
raises error: 2046 The command or action 'DeleteRecord' isn't available
now.
Why could it be?
Thanks

Nov 13 '05 #5

P: n/a
Hi Wayne,
Yes, it is on Click event and button is on the same form

"Wayne Morgan" <co***************************@hotmail.com> wrote in message
news:7g*******************@newssvr30.news.prodigy. com...
Igor,

Are you running this code in the Click event of a button? If so, is there
any other code in that event? Where is the button located, is it on the
form you are trying to delete the record from?

--
Wayne Morgan
MS Access MVP
"Igor" <Ig*********@sasktel.net> wrote in message
news:11*************@corp.supernews.com...
Hi,
DoCmd.RunCommand acCmdDeleteRecord
raises error: 2046 The command or action 'DeleteRecord' isn't available
now.
Why could it be?
Thanks


Nov 13 '05 #6

P: n/a
In that case, unless there is some other code that is interfering, I don't
know. I even checked to see what would happen if you were at a new, unsaved
record. But the code and toolbar button both deleted the new, unsaved
record. No error was generated.

Just to verify, the button is on the SAME form, not a subform or parent form
of the form that has the record you're trying to delete.

--
Wayne Morgan
MS Access MVP
"Igor" <Ig*********@sasktel.net> wrote in message
news:11*************@corp.supernews.com...
Hi Wayne,
Yes, it is on Click event and button is on the same form

Nov 13 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.