Could someone show me some example code I could use to prompt the user to save or disgard the information entered into the form, when they exit the form?
Msg = " Are you sure you want to Save this Record ?"
Style = vbYesNo + vbInformation + vbDefaultButton2
Title = "Save Record ?"
Response = MsgBox(Msg, Style, Title)
If Response = vbYes Then
MyString = "Yes"
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
MsgBox "The Record has been saved to the database", vbOKOnly, "Record Saved"
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.