473,569 Members | 2,731 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Disabling the Auto Save Function

8 New Member
Hello,

I've constructed a data entry form in Access 2003 that is bound to two related tables. A subform is embedded into the main form.

I enter data for the parent table into the main form and data for the child table into the subform.

By default, Access saves the record on the main form to the database if I move to the next record in the subform.

I would prefer to control when Access saves a record so I can have better control over validating the entries. Is it possible to control when Access saves a record on a bound form?
Jun 23 '07 #1
4 12542
FishVal
2,653 Recognized Expert Specialist
Hello,

I've constructed a data entry form in Access 2003 that is bound to two related tables. A subform is embedded into the main form.

I enter data for the parent table into the main form and data for the child table into the subform.

By default, Access saves the record on the main form to the database if I move to the next record in the subform.

I would prefer to control when Access saves a record so I can have better control over validating the entries. Is it possible to control when Access saves a record on a bound form?
Hi!

You can handle Form BeforeUpdate event.
An example below will disable saving to db at all.

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_BeforeUpdate(Cancel As Integer)
  2. Me.Undo
  3. End Sub
  4.  
Jun 23 '07 #2
missinglinq
3,532 Recognized Expert Specialist
You're right! The example given will disable all saving to db, but what's the point of having a database that you can never save a record to?

When you leave the record (to go to the subform) you have two choices, either save the record or dump it. If you need to do data validation, you need to do it at this point, using, as pointed out, the Form_BeforeUpda te event. You cannot enter data on the main form, freeze it, so to speak, go to the subform and then come back to it!
Jun 23 '07 #3
FishVal
2,653 Recognized Expert Specialist
You're right! The example given will disable all saving to db, but what's the point of having a database that you can never save a record to?

When you leave the record (to go to the subform) you have two choices, either save the record or dump it. If you need to do data validation, you need to do it at this point, using, as pointed out, the Form_BeforeUpda te event. You cannot enter data on the main form, freeze it, so to speak, go to the subform and then come back to it!
Right. This is what I've pointed out.
Sure that BeforeUpdate should contain more useful code, e.g. data validation, confirmation message etc. I've given an idea only.

By the way, setting Cancel=True in BeforeUpdate handler causes an interesting but useless effect when moving to subform:
focus is moved to subform,
record in mainform stays unsaved and never got focus again :-/
Jun 23 '07 #4
stpark22
8 New Member
FishVal & missingling,

Thank you for responding. Now I realize the this approach is not a pratical one. missingling,
Thank you for pointing out how the records are treated when you leave the main form. I wasn't aware that there were only two options at that point: save or dump. I was naively under the express that the records can be frozen while navigating through each form.

Thanks again.
Jun 25 '07 #5

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

Similar topics

5
3407
by: Barry | last post by:
Hello, I've recently noticed that someone can simply type in the URL to my javaScript, from my HTML source code, to the explorer location bar and an auto-save dialog pops up to let them save it ! My clients want to keep their paid-for code proprietary. How do I prevent this from occuring ? The javaScripts are embedded in my HTML in the...
15
2629
by: Hal Robertson | last post by:
I have created a rather complicated series of html forms for a data entry wizard In my mozilla browser, every time I submit each form along the process, it asks me if I want to remember the values I entered. How do I, in HTML, tell Mozilla and other browsers with this feature to not offer that option? thanks
18
2195
by: nenad | last post by:
Wouldn't it be nice if we could do something like this: class Funky{ public: auto virtual void doStuff(){ // dostuff } };
5
5042
by: Lyn | last post by:
Hi, I hope someone can help. I have a main form which mostly fills the Access window. In the bottom half of this form I have a tab control to display various types of data related to the main form record. In each page of the tab control, there are three buttons: Add, Update, Delete. Any of these buttons will open another, smaller form...
1
1798
by: Jason Galvin | last post by:
I would like to disable the auto-populating feature (remembers form element text between post-backs) when creating a .NET form. I have succeeded in disabling auto-populate by creating my controls during PreRender, but that becomes highly cumbersome. Is there a way to explicitly turn off auto-populate? I'm pretty sure the form isn't...
5
17687
by: Navillus | last post by:
Hey gang, I have a login form that is empty by default, but can be filled with values from a previous form: <input type=text maxlength="40" size="40" name="user" value="`usr`"> <input type=password maxlength="8" name="password" value="`pss`"> where usr and pss are sent from the previous form.
1
2563
by: kkuniya | last post by:
Situation : - A form (method : POST, action : itself, onsubmit : alert 'Submit' ) - Got 2 submit button ( 'Save' , 'View') - Got navigation 1|2|3|4 What I want to do : - Once clicked on the navigation page, it will save the page without need to click on 'Save' button. Currently, if i manually clicked on the 'Save' button; it will save the...
2
5521
by: john | last post by:
Is it true that if I split my access database in backend and frontend and I implement custom auto increment for the ID fields, that my database is ready to be used in a multi-user environment? I found a zillion messages about auto increment and read some of them but it's confusing. Can someone point me to a simple custom auto increment example...
10
8520
by: Sebarry | last post by:
Hi, Probably not a great place for this post, but FCKeditor is very well used so hopefully someone can help. Basically I have a form with two buttons - an edit button that creates an FCKeditor instance and creates a dynamic save function and a save button that needs to do some Javascript stuff before submitting the form. The save stuff looks...
2
1610
WhiteRider
by: WhiteRider | last post by:
Hi folks! I'd like to know if theres a way to stop Linux (or at least Slax) from making a backup of an edited file. For example when you make a text file, edit it and then save it , lets say, as "hello" Linux will create a backup of it as "hello~". This can be annoying for me because I feel it can clutter some of my folders. Even if it...
0
7698
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...
0
7612
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...
0
8122
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...
1
7673
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...
0
7970
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...
0
6284
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...
1
5513
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...
0
3653
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...
1
2113
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

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.