Delet record

J

James J

I found this code below to dele a record from my table,
the problem is that it flashes up a message box which
askes if Im sure i want to delete the record
can it be changed so that the message box does not
appear. and it just does the delete action.

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

Thanks
 
J

Josef

I found this code below to dele a record from my table,
the problem is that it flashes up a message box which
askes if Im sure i want to delete the record
can it be changed so that the message box does not
appear. and it just does the delete action.

DoCmd.SetWarnings False
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
DoCmd.SetWarnings True
 

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