Solved

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

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
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…

630 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