confirmation window after clicking a macro

Thijscr.

New member
Local time
Today, 21:43
Joined
Nov 11, 2008
Messages
1
Hello,
I made a macro that when i click it i save the record im currently viewing, but when i click it i want to see a window coming up wich asks me if im sure i want to delete the record and then i have to click yes or no.
How do i make this confirmationwindow?
Thanks in advance,
 
Last edited:
If you are viewing records through a form, then you could replace the code behind the command button to something like...

Dim vbresponse As Integer

vbresponse = MsgBox("Are you sure you want to delete this record?", vbYesNo, "DELETE RECORD CONFIRMATION")

If vbresponse = 6 Then
DoCmd.RunMacro "Yourmacronamehere"
End If

Kempes
 

Users who are viewing this thread

Back
Top Bottom