473,327 Members | 1,896 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,327 software developers and data experts.

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 12455
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+vbQuestion)=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 = acDataErrContinue

--
Wayne Morgan
MS Access MVP
"Christopher Koh" <ch******@yahoo.com> wrote in message
news:2f*************************@posting.google.co m...
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 = acDataErrContinue mean?
"Wayne Morgan" <co***************************@hotmail.com> wrote in message news:<w%***************@newssvr24.news.prodigy.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+vbQuestion)=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 = acDataErrContinue

--
Wayne Morgan
MS Access MVP
"Christopher Koh" <ch******@yahoo.com> wrote in message
news:2f*************************@posting.google.co m...
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 = acDataErrContinue 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
"Christopher Koh" <ch******@yahoo.com> wrote in message
news:2f************************@posting.google.com ...
thanks for helping me out Wayne, now I know
btw what does If DataErr = 2169 Then Response = acDataErrContinue mean?
"Wayne Morgan" <co***************************@hotmail.com> wrote in

message news:<w%***************@newssvr24.news.prodigy.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+vbQuestion)=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 = acDataErrContinue

--
Wayne Morgan
MS Access MVP
"Christopher Koh" <ch******@yahoo.com> wrote in message
news:2f*************************@posting.google.co m...
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
by: richard | last post by:
I need export only the changed data (updated or deleted or inserted) into Oracle. Any suggestion? Thanks
3
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...
1
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...
1
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...
17
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...
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...
1
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...
3
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...
1
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.