473,385 Members | 1,647 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Autosave Access Forms

How can I disable auto save function in access forms?Currently, If accidentally something is changed in forms, it gets saved automatically without being prompted.

Thanks in advance
Jun 11 '10 #1

✓ answered by MMcCarthy

You could add code to the forms Before_Update event. Something to ask the user if they want to save changes to the form and based on a yes/no answer either save or undo those changes.

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_BeforeUpdate(Cancel As Integer)
  2. Dim rslt As Integer
  3.  
  4.     If Me.Dirty Then
  5.         rslt = MsgBox("Do you want to save the changes you have made to the form", vbYesNo)
  6.         If rslt = vbNo Then ' if the user didn't mean to make changes
  7.             Me.Undo
  8.         End If
  9.     End If
  10.  
  11. End Sub

2 3601
MMcCarthy
14,534 Expert Mod 8TB
You could add code to the forms Before_Update event. Something to ask the user if they want to save changes to the form and based on a yes/no answer either save or undo those changes.

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_BeforeUpdate(Cancel As Integer)
  2. Dim rslt As Integer
  3.  
  4.     If Me.Dirty Then
  5.         rslt = MsgBox("Do you want to save the changes you have made to the form", vbYesNo)
  6.         If rslt = vbNo Then ' if the user didn't mean to make changes
  7.             Me.Undo
  8.         End If
  9.     End If
  10.  
  11. End Sub
Jun 11 '10 #2
@msquared
Thanks msquared, That resolved my problem.
Jun 11 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: mamatha | last post by:
Hi I have Access forms and i want to add our company's logo to that form.How can i add,if any one knows let me know.
2
by: Kim Skytte | last post by:
HI! I have a few questions about access . 1) Does anyone know if it is possible to apply skins to Access forms ?? 2) Is is possible to hide the main access windows, and just show the forms.
7
by: James Fortune | last post by:
In response to different users or situations (data context) I transform the appearance and characteristics of Access Forms through code. This seems to fit in with the idea of polymorphism. Do...
0
by: vlpkumar | last post by:
I saw a lot of resources for creating and linking to a PDF document from within Access all over the internet. I would like to know if it is possible to accomplish the inverse task of hyperlinking...
7
by: dtecmeister | last post by:
Looking to see how many people could use this kind of tool. I've got several large databases I've developed in Access with MySQL as the back-end. I've started using Linux instead of windows and...
3
by: mumbaimacro | last post by:
hi i am a newbie to access programming,, i need help to 1. view PDF inside Ms-access forms whether the PDF Location from the Folder or the Path in table. 2. view ms- photoeditor...
7
by: mumbaimacro | last post by:
hi i am using Adobe pdf reader ActiveX in ms-access, I have given in form load() Private Sub Form_Load() Dim FILENAME As String FILENAME = "D:\SAMPLES\Test.pdf" AcroPDF5.LoadFile FILENAME
19
by: jalmar | last post by:
My question is related to Access forms. I have set up an Access form using 4 different tables~I am pulling 2 different numbers and the name of Trusts out of one table, I am pulling custodian name...
2
by: =?Utf-8?B?UGV0ZQ==?= | last post by:
Happy New Year everyone. Quick question: does anyone know a good tool for converting Access forms into VB.Net form? Pete
2
by: Luting | last post by:
Hi, Is it possible to update oracle via Access forms? I am thinking maybe I could make a link table connnected with oracle database. And the form could be based on the link table. Does this...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.