Prompt user before saving

maya

Registered User.
Local time
Today, 16:56
Joined
Jun 11, 2003
Messages
139
How to create a message box to prompt the user before saving a record in Access?
 
Form Before_Update
Dim Msg, Style, Title, Response, MyString
MsgBox "Do you wish to save the changes . ", vbOKOnly, ""
Style = vbYesNo + vbExclamation + vbDefaultButton1 .
Title = "Save changes?"
Response = MsgBox(Msg, Style, Title)
If Response = vbYes Then
DoCmd.RunCommand acCmdSaveRecord

Else:
Me.Undo
End If
End Sub
 

Users who are viewing this thread

Back
Top Bottom