Solved

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

Posted on 2012-03-12
1
578 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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 views 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 Microsoft Access…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

777 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