Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2012-03-12
1
Medium Priority
?
588 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 D
1 Comment
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 2000 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

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

Question has a verified solution.

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

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

927 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