DoCmd.RunCommand acCmdDeleteRecord does nothing!

V

vainglory

Hi,

I was revising my code as recommended to avoid using:

DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70

and use:

DoCmd.RunCommand acCmdDeleteRecord

But as soon as I did, I noticed that my delete button seemed to die.
That is, whenever I violate referential integrity, or attempt to delete
a record that has nulls in a required field or primary key or has
duplicates in a primary key I get no error whatsoever! In fact,
nothing happens! Is this normal?

Thanks in advance,

Paolo
 
V

vainglory

Further to my message...

I replaced:

DoCmd.RunCommand acCmdDeleteRecord

with

DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdDeleteRecord

and I got my error messages back. Strangely, I still have no warning
messages. Please I am dying of curiosity as to why this is happening.
Any ideas?

Thanks in advance,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top