473,729 Members | 2,405 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Save record if any field has been modified on form

Joe
I have a form which displays data in 3 related tables. I want to give
the user a prompt to save changes when any field has been modfied on
the form.

Is there a easy way to do this so the 1 or more changes to a field can
be saved at once?

Thanks!

Nov 13 '05 #1
2 18472
"Joe" wrote
I have a form which displays data
in 3 related tables. I want to give
the user a prompt to save changes
when any field has been modfied on
the form.


If this is a "bound form", that is, has a RecordSource of a Query that joins
the three related tables, then the data will be saved if the record is
changed -- saving will take place automatically when you move off the record
to another, or move to a subform control on the form, or close the form. You
can also save explicitly via VBA code using the statement Me.Dirty = False,
or DoCmd.RunComman d acSaveRecord, by the menu, or by a PF key action.
Explicit action to save is rarely needed except in special cases.

If you are using an unbound form, that is, using your own VBA code to read
the data, put it in controls for display, etc., then you will have to
determine the conditions under which the record needs to be saved, which
specific record needs to be saved, and perform the save yourself in your VBA
code. I do not recommend using unbound forms for handling data, as a general
rule.

Larry Linson
Microsoft Access MVP

Nov 13 '05 #2
The user does not a prompt. The record on the screen will be automatically
saved if a change has been made if,
1. the user goes to a new record
2. the user closes the form
3. the user closes Access

To detect if a change has been made, look at the Dirty property in the Help
file.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdata sheet.com
www.pcdatasheet.com
"Joe" <jc**********@c omcast.net> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
I have a form which displays data in 3 related tables. I want to give
the user a prompt to save changes when any field has been modfied on
the form.

Is there a easy way to do this so the 1 or more changes to a field can
be saved at once?

Thanks!

Nov 13 '05 #3

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

Similar topics

4
25028
by: Andras Gilicz | last post by:
Hi VB fans I'm working on a relatively large project in VB6 with about a dozen forms, including graphs, labels, text boxes, etc. The software itself is actually a flow simulator with more or less complex technical calculations, several input variables. I would like to equipp the starting panel with the usual New, Open, Save, Save As, Close etc. menus (like in Excel, or Word, etc.) What is the best way to accomplish Save, or Save As?...
1
2362
by: George Raetz | last post by:
Greetings, I open the "Northwind" sample data base in Access 2003. In the "Orders" form there is a "CustomerID" combobox labeled "Bill To". I scroll thru the list in the combobox and make a selection; that changes the appropriate fields in the displayed record. However, when I close the form and reopen it, the record reverts back to the original data. Even with menu choice "Save Record" the modified data is not changed. Is this normal...
8
4459
by: ISmith | last post by:
Hi, I am trying to increment a field on a form after a record has been stored. It is a standard fumeric field which may contain some blocks of consecutive values in the table but is not meant to be an auto increment field. I have been trying to store the value of the field in a variable and then me.field +1 but it is not working - what event should I be using to a) store current value, b) increment value on new record ?
2
2869
by: josephm | last post by:
Hello Group: My first post on the group.Hope I get a response. I have a modest Fire Insurance ACCES Db.Thanks to this group - for the code. A "wanna be programmer"... "LEARNS" The code here-under (from the Archive) duplicates the EXPIRING records but affords the USER to give ONLY A NEW POLICY NO (NewKey),should a client opt to renew upon expiry of the YEARLY POLICY.The NEW POLICY NO is save as a NEW record along with the "old"static...
1
2326
by: David | last post by:
Hi, I have a continuous form with 'x' amount of records. 1 field on each record is a number, of which I have a field at the top of the form which just shows the running sum. If I enter a new record, after I loose focus of the number field, I perform a save record and then test the data with a calculation, but the problem I have is that the sum field always updates a second later than the save and calculation is performed, even though...
10
12714
by: MLH | last post by:
Suppose, in a multi-user environment, you have append query SQL in a VBA procedure that looks like INSERT INTO MyTable... and the next line reads MyVar=DMax("","MyTable... You can never be certain that MyVar will be set to the key-field value that was created when the Append query ran. Now, there are other ways to do it - I know - that will ensure you 'nab' the correct record. But I was wondering
2
3196
by: rockdc1981 | last post by:
I dont it is possible to put this codes together.. I want to prompt the user to save the record and at the same time have a log of audit trail. the codes work out fine separately. Code for Audit Trail Option Compare Database Const cDQ As String = """" Sub AuditTrail(frm As Form, recordid As Control) 'Track changes to data. 'recordid identifies the pk field's corresponding
0
1998
by: Andy_Khosravi | last post by:
I'm having issues with updates being blocked due to some sort of record locking issue. The error does not occur consistently, so I've had a hard time nailing it down. It does happen enough to cause major problems for my users though as they are working in this all day. I've been pounding my head against the wall for the last week trying to get this figured out. BACKGROUND I have an Access 03 DB that is split with the BE on a network...
7
2174
by: Neil | last post by:
Was working in A2003 and noticed that the Save Record item on the Records menu was not available when the record was not dirty. In A2000, Save Record was always available. (This is a problem for me because I have Docmd.Runcmd acCmdSaveRecord code all over the place, which never gave an error before. But now it was giving an error when the Save Record menu command wasn't available.) So I went back to A2000 and confirmed that the Save...
0
9427
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
9284
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
9202
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
9148
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
8151
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...
0
6022
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4796
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3238
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
2
2683
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.