Senin, 27 Juli 2015

Re: [MS_AccessPros] Confirmation Message for Built-in Menu

 

Dear Ozair,

You may use the following code in you Form: (please adjust where necessary)

Private Sub Form_BeforeDelConfirm(Cancel As Integer, _
Response As Integer)
' Suppress default Delete Confirm dialog box.
Response = acDataErrContinue
' Display custom dialog box.(you can replace it with any message you want)
If MsgBox("Do you want to delete this entry?", vbOKCancel) = vbCancel Then
Cancel = True
End If
End Sub

Private Sub Form_AfterDelConfirm(Status As Integer)
Select Case Status
Case acDeleteOK
MsgBox "Deletion occurred normally."
Case acDeleteCancel
MsgBox "Programmer canceled the deletion."
Case acDeleteUserCancel
MsgBox "User canceled the deletion."
End Select
End Sub

'************************************************* ****************
regards

Ahmed

On Mon, Jul 27, 2015 at 3:04 PM, ozairkhalid@hotmail.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
 

Hi,

I am trying to create a custom confirmation dialog for Built-in 'Delete Record' Menu.

I wish to invoke a typical confirmation message such as "Do you really want to delete?"
Any help is greatly appreciated.

It is Access 2003 on a Windows 7 machine.

Regards,
Ozair



__._,_.___

Posted by: Ahmed Hashim <ahmedhashim1@gmail.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)

.

__,_._,___

Tidak ada komentar:

Posting Komentar