Solved

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

Posted on 2012-03-12
1
581 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
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…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

734 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