PDA

View Full Version : Is it an Error?



prabhafriend
07-23-2010, 04:24 AM
"The Command or action 'DeleteRecord' isn't available now" - Is it an Error? If not What it is this? How to Trap this and show my custom message. It comes when you delete a record in newrecord state - the Last blank record in a continous form.

Imdabaum
07-23-2010, 10:47 AM
"The Command or action 'DeleteRecord' isn't available now" - Is it an Error? If not What it is this? How to Trap this and show my custom message. It comes when you delete a record in newrecord state - the Last blank record in a continous form.

Are you in Debug mode? You cannot run DoCmd.RunMenu acDeleteRecord or acSaveRecord if you are stepping through code.

Set your breakpoint after the command if you still want to debug.
If you're not in debug mode... ignore me.

prabhafriend
07-26-2010, 08:01 PM
Imdabaum. You did not understand my question. I asked the question Because the Sentence "The Command or action 'DeleteRecord' isn't available now" cannot be trapped by OnError. So I doubt it's an Error or an access default dialog. If it's not an Error how to trap it?

Imdabaum
07-26-2010, 10:07 PM
I don't understand your question. How are you trying to trap it? Why do you need to trap this?
Can you post the code you are using?

prabhafriend
07-26-2010, 10:18 PM
Imdabaum, It comes when you delete a record in newrecord state - the Last blank record in a continous form. I need to trap this because I need to show a custom message and do some operations when this scenario comes. How to trap this.