473,779 Members | 2,083 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help! Access automatically saves any changed data on tables

how do you stop Access from saving any changed data in your tables and
queries?
like i just add or change data on the table/query tables,then click on
X (exit)because i have no intention of saving it but access still
automatically saves it even if I did not press the save command on the
menu/toolbar? What is the solution for this? help thanks!
Nov 13 '05 #1
3 12552
The Save command on the toolbar is to save structural changes to objects in
your database, not for saving data. There is another command that will save
a record on demand. The behaviour you mention is by design. Access will save
any changes when you leave the current record, whether that be to go to
another record or by closing the form, query, or table. In a form, you can
do something to abort this behaviour. In the Form's BeforeUpdate event, you
can prompt to save changes and give the use the option to cancel. However,
this will happen for every record change.

Example:
If MsgBox("Save Change?", vbYesNo+vbQuest ion)=vbNo Then
Cancel = True
Me.Undo
End If

Also, in the Form's Error event you will need the following:
If DataErr = 2169 Then Response = acDataErrContin ue

--
Wayne Morgan
MS Access MVP
"Christophe r Koh" <ch******@yahoo .com> wrote in message
news:2f******** *************** **@posting.goog le.com...
how do you stop Access from saving any changed data in your tables and
queries?
like i just add or change data on the table/query tables,then click on
X (exit)because i have no intention of saving it but access still
automatically saves it even if I did not press the save command on the
menu/toolbar? What is the solution for this? help thanks!

Nov 13 '05 #2
thanks for helping me out Wayne, now I know
btw what does If DataErr = 2169 Then Response = acDataErrContin ue mean?
"Wayne Morgan" <co************ *************** @hotmail.com> wrote in message news:<w%******* ********@newssv r24.news.prodig y.com>...
The Save command on the toolbar is to save structural changes to objects in
your database, not for saving data. There is another command that will save
a record on demand. The behaviour you mention is by design. Access will save
any changes when you leave the current record, whether that be to go to
another record or by closing the form, query, or table. In a form, you can
do something to abort this behaviour. In the Form's BeforeUpdate event, you
can prompt to save changes and give the use the option to cancel. However,
this will happen for every record change.

Example:
If MsgBox("Save Change?", vbYesNo+vbQuest ion)=vbNo Then
Cancel = True
Me.Undo
End If

Also, in the Form's Error event you will need the following:
If DataErr = 2169 Then Response = acDataErrContin ue

--
Wayne Morgan
MS Access MVP
"Christophe r Koh" <ch******@yahoo .com> wrote in message
news:2f******** *************** **@posting.goog le.com...
how do you stop Access from saving any changed data in your tables and
queries?
like i just add or change data on the table/query tables,then click on
X (exit)because i have no intention of saving it but access still
automatically saves it even if I did not press the save command on the
menu/toolbar? What is the solution for this? help thanks!

Nov 13 '05 #3
If you cancel the update while trying to close the form you'll get a data
error saying something like, "the data can't be save right now, do you wish
to cancel the update?". The error number for this error is 2169. Since it is
a data error, not a runtime error, you have to trap this error in the form's
Error event. The Response = acDataErrContin ue just tells Access to ignore
the error and continue. In this case, it results in you not being prompted
and the form closes.

--
Wayne Morgan
Microsoft Access MVP
"Christophe r Koh" <ch******@yahoo .com> wrote in message
news:2f******** *************** *@posting.googl e.com...
thanks for helping me out Wayne, now I know
btw what does If DataErr = 2169 Then Response = acDataErrContin ue mean?
"Wayne Morgan" <co************ *************** @hotmail.com> wrote in

message news:<w%******* ********@newssv r24.news.prodig y.com>...
The Save command on the toolbar is to save structural changes to objects in your database, not for saving data. There is another command that will save a record on demand. The behaviour you mention is by design. Access will save any changes when you leave the current record, whether that be to go to
another record or by closing the form, query, or table. In a form, you can do something to abort this behaviour. In the Form's BeforeUpdate event, you can prompt to save changes and give the use the option to cancel. However, this will happen for every record change.

Example:
If MsgBox("Save Change?", vbYesNo+vbQuest ion)=vbNo Then
Cancel = True
Me.Undo
End If

Also, in the Form's Error event you will need the following:
If DataErr = 2169 Then Response = acDataErrContin ue

--
Wayne Morgan
MS Access MVP
"Christophe r Koh" <ch******@yahoo .com> wrote in message
news:2f******** *************** **@posting.goog le.com...
how do you stop Access from saving any changed data in your tables and
queries?
like i just add or change data on the table/query tables,then click on
X (exit)because i have no intention of saving it but access still
automatically saves it even if I did not press the save command on the
menu/toolbar? What is the solution for this? help thanks!

Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1301
by: richard | last post by:
I need export only the changed data (updated or deleted or inserted) into Oracle. Any suggestion? Thanks
3
2578
by: brian kaufmann | last post by:
Hi, I had sent this earlier, and would appreciate any suggestions on this. I need to make calculations for unemployment rate for three different data sources (A,B,C) for many countries and age groupings. The calculation is: unemployment rate = number of unemployed/number of labour force
1
2986
by: ANSWER | last post by:
Hi, Is there any way I could disable someone to create a new database and import all of my tables into his database. I make .mde, disable shift+Enter, make logon module but still my tables are free to take. Please haelp me to solve this. Thanks
1
3066
by: Felix_WafyTech | last post by:
Hi, I'm working with the ObjectDatasource and the application is getting more and more chatty. Is there a way I could make the ObjectDatasource support multiple DataTables that could be retrieved as one Dataset? I'm wondering how others out there work with ObjectDatasource? The only option I now see to get this fixed is to manually make the call to the Web services, retrieve the Dataset and assign the datatable to the controls (Or can...
17
3554
by: Timothy.Rybak | last post by:
Hello all, This is my first attempt at an application, so kid gloves are appreciated. I need to make a very simple form that only has a few elements. One is TraceCode - a text field that is populated when a user scans a label. The other is ScanDate - a date/time field that should equal the date/time of the scan (e.g. 7/31/2006 5:00:00 AM).
19
25839
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 and acct number from 2nd table, 2 different numbers from Investment manager table and then 3 empty fields (at this time-needs to be populated by form) out of the 4th table. Can you tell me why I am not able to enter data into the 3 empty fields while...
1
2797
by: tezza98 | last post by:
I need some help. Im using a dtsrun command to import 9 tables into an Access database, most of the tables have about 1000 rows, but one has 20000+ rows and grows everyday. Im Using Access 2003 and SQL Server 2000. on a WinXP Machine When the database is opened a stored procedure drops all the tables and then imports the csv files using dtsrun. The database is only used for reporting and the data is entered into the csv files using 3rd...
3
7827
by: Adamowski | last post by:
Hello, I am currently using Access 2007 on an XP laptop. I have a table and a form used to add records to the table. I have noticed that if I close the form without filling out all of the information in the form, the form data is still written to the table as a record. Since the person using this form may have to unexpectedly close the form, how can I disable this functionality? I do not want incomplete records being saved to the table....
1
5417
by: Max2006 | last post by:
Hi, I am truing to find a pattern for my Business Logic Layer to be able to work fine win ObjectDataSource's Update method. The challenge is ObjectDataSource is not able to work with an update method that accepts a strongly typed data table as parameters. We have to have an update method with all data table's columns as its parameter. Like what we have here: http://asp.net/learn/data-access/tutorial-16-cs.aspx
0
9636
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9474
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10306
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10075
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8961
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7485
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5373
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4037
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2869
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.