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!
3 7827
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: - Private Sub CloseFormButton_Click()
-
If Me.Dirty Then
-
resp = MsgBox("Do You Wish to Save The Last Record Added?", vbYesNo, "Save New/Edited Record?")
-
If resp = vbNo Then
-
Me.Undo
-
Else
-
Me.Dirty = False
-
End If
-
End If
-
DoCmd.Close
-
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)>
Glad we could help!
Linq ;0)> Sign in to post your reply or Sign up for a free account.
Similar topics |
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!
|
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...
|
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...
|
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...
|
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",...
| |
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...
|
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...
|
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...
|
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.
|
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,...
|
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...
| |
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...
|
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,...
|
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...
|
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...
|
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...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |