PC Review


Reply
Thread Tools Rate Thread

Answer "Yes" when delete a record

 
 
Luis Marques
Guest
Posts: n/a
 
      12th Sep 2008
I have the following code, to delete a record. But before access delete it,
needs a confirmation (yes/no).

What code do I need, to always answer yes?

DoCmd.DoMenuItem acFormBar, acEditMenu, acSelectRecord, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, acDelete, , acMenuVer70

Thanks in advance
 
Reply With Quote
 
 
 
 
Dennis
Guest
Posts: n/a
 
      12th Sep 2008
The following will do it without the prompt

DoCmd.SetWarnings False
DoCmd.DoMenuItem acFormBar, acEditMenu, acSelectRecord, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, acDelete, , acMenuVer70
DoCmd.SetWarnings True

"Luis Marques" wrote:

> I have the following code, to delete a record. But before access delete it,
> needs a confirmation (yes/no).
>
> What code do I need, to always answer yes?
>
> DoCmd.DoMenuItem acFormBar, acEditMenu, acSelectRecord, , acMenuVer70
> DoCmd.DoMenuItem acFormBar, acEditMenu, acDelete, , acMenuVer70
>
> Thanks in advance

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reset "Delete" Option, so i dont have to answer yes/no each time KiwiKev Microsoft Word Document Management 2 30th Oct 2008 03:33 PM
"Delete Record" not working after adding "Edit Record" button. Mike Janes Microsoft Access 7 20th Aug 2006 03:10 PM
"no current record" when deleting & record in sub table not delete =?Utf-8?B?R3VpeiBhbmQgQWNjZXNzIC0gTm8gY29kaW5nIGFi Microsoft Access 0 18th Jan 2006 03:58 PM
Hide "Record" "Closed Caption" "Parental Control" indicators while in full screen Jordan ATI Video Cards 0 18th Feb 2005 05:21 PM
delete record if "date" < "today" Wax Microsoft Access Getting Started 2 16th Sep 2004 12:25 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:37 AM.