473,791 Members | 3,059 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Disable how Access automatically saves forms into table...

5 New Member
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.

Thanks!
Jul 10 '07 #1
3 7827
missinglinq
3,532 Recognized Expert Specialist
I always go into Design View for the form, under Properties - Format set Close Button to No, then put my own close button on the form. Then use spmething like this:

Expand|Select|Wrap|Line Numbers
  1. Private Sub CloseFormButton_Click()
  2. If Me.Dirty Then
  3.   resp = MsgBox("Do You Wish to Save The Last Record Added?", vbYesNo,  "Save New/Edited Record?")
  4.      If resp = vbNo Then
  5.        Me.Undo
  6.      Else
  7.        Me.Dirty = False
  8.      End If
  9. End If
  10. DoCmd.Close
  11. End Sub
This way Accesss will check the record to see if it's Dirty, then give the user the option to either save or discard the new record.. You should also be aware that at times, if a required field is not filled in, Accesss will Exit and not Save the record!

Linq ;0)>
Jul 10 '07 #2
Adamowski
5 New Member
It worked great. Thanks!
Jul 11 '07 #3
missinglinq
3,532 Recognized Expert Specialist
Glad we could help!

Linq ;0)>
Jul 12 '07 #4

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

Similar topics

3
12553
by: Christopher Koh | last post by:
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!
49
14361
by: Yannick Turgeon | last post by:
Hello, We are in the process of examining our current main application. We have to do some major changes and, in the process, are questionning/validating the use of MS Access as front-end. The application is relatively big: around 200 tables, 200 forms and sub-forms, 150 queries and 150 repports, 5GB of data (SQL Server 2000), 40 users. I'm wondering what are the disadvantages of using Access as front-end? Other that it's not...
15
13343
by: Mark C | last post by:
All, I have exhaustingly been looking through the newsgroups in search of a way to systemically output an Access 97 report to a pdf file using the full version of Adobe Acrobat. I want the user to be able to click a button and have the Access report saved as a pdf in a directory specified by me the programmer. I have seen a posting by John Baker promoting a web-sight that has an mde that one can reference in any database but after 30...
52
9989
by: Neil | last post by:
We are running an Access 2000 MDB with a SQL 7 back end. Our network guy is upgrading to Windows Server 2003 and wants to upgrade Office and SQL Server at the same time. We're moving to SQL Server 2005, and, since he already has licenses for Office Pro 2002, he wants to upgrade to that. I've been saying that we need to upgrade to Access 2003, not 2002, even if Office is kept at 2002. We are also looking to do a fair amount of...
25
2270
by: DFS | last post by:
I have a job to automatically import Excel data and post to database tables, via a point-click interface. Choose-file-and-it-does-the-rest kind of thing. Cient stores data in columns in his sheet (I told them it should be in rows, but that's another issue). Sometimes the sheet gets new columns added. At that point, Access/import spec won't recognize the new columns. DoCmd.TransferText acImportDelim, "importSpec", "TABLE_NAME",...
0
1318
by: zeeshansohail | last post by:
I am developing a Database in ORACLE. I have Master/Detail relationship between two tables named as BILL (Master Table) and DETAIL_DETAIL (Detail Table). Master Table BILL contains product information like Bill_Id, ProductCode, ProductName, and BILL_DETAIL table contains Bill_Id, Sr_No, BillAmount, CompanyInfo and Product_Category. I am developed Forms using DEVELOPER 2000 FORMs 6i, The problem states that in some Products, Companies...
2
1832
by: bandkindy | last post by:
To preface, I am pretty green on the whole sql thing, but am learning quickly so please bear with me. I have an excel file that is copied to 5 users directories so they have their own working copy. This file is populated by the user. There is a macro that saves the file and names it based on specific data the user enters (first last name). I have that working fine. I also have created a macro that dumps the data to an Access 2007 db named...
1
1542
by: bandkindy | last post by:
To preface, I am pretty green on the whole sql thing, but am learning quickly so please bear with me. I have an excel file that is copied to 5 users directories so they have their own working copy. This file is populated by the user. There is a macro that saves the file and names it based on specific data the user enters (first last name). I have that working fine. I also have created a macro that dumps the data to an Access 2007 db named...
9
4497
by: prakashwadhwani | last post by:
Hi !! I'm about to develop a new project for a client. Should I go about it in Access 2003 or 2007 ? Purchasing it either for me or for my client is not a major consideration here ... what I'd like to know is the stability, speed & ease of use of both the products. I believe Access 2007 has a new file format too and that it may be slower.
0
9512
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
10419
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...
0
10201
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10147
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
9987
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9023
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
7531
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...
2
3709
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2910
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.