Solved

Confirm Record Changes not working...(2003 mdb now in Access 2010)

Posted on 2012-03-12
1
576 Views
Last Modified: 2012-04-25
I have an MS Access 2003 MDB file I am now using in Access 2010.

I have several forms.  When the user leaves the form, I would like access to ask if the user wants to save changes or discard them.

In the Options-->Client Settings--> Confirm, the Record Changes is Checked.

Currently chagnes are saved, but NO confirmation.

Thanks.
0
Comment
Question by:Rog
1 Comment
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 500 total points
ID: 37712458
The setting you refer to will only affect bulk update queries.

To do what you are asking, you can use code on the BeforeUpdate event of the form:

Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim bytSave As Byte
bytSave = MsgBox("Save Changes?", vbYesNo + vbQuestion)
If bytSave = vbNo Then
    Cancel = True
    Me.Undo
    Exit Sub
End If
   
End Sub



JeffCoachman
0

Featured Post

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

Suggested Solutions

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now