473,656 Members | 2,997 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Keep a history of data changes?

This is something I haven't come across yet, but it's something I need
to do. Don't ask why, it's just got to get done.

I need to keep a table of all changes to a specific field in another
table. I've never dealt with anything like this. How would I get the
value that's in a field and then the value that it was changed to, and
pass both of them to a table? Well, I know how to pass them to the
table, but I don't know how I would store them both in variables.

Any help would be appreciated.

Dec 27 '06 #1
5 7168
Access lacks triggers, but if all changes are done in a form, you can use
the events of the form, to log the changes.

Example in:
Audit Trail - Log changes at the record level
at:
http://allenbrowne.com/AppAudit.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"ManningFan " <ma********@gma il.comwrote in message
news:11******** **************@ 79g2000cws.goog legroups.com...
This is something I haven't come across yet, but it's something I need
to do. Don't ask why, it's just got to get done.

I need to keep a table of all changes to a specific field in another
table. I've never dealt with anything like this. How would I get the
value that's in a field and then the value that it was changed to, and
pass both of them to a table? Well, I know how to pass them to the
table, but I don't know how I would store them both in variables.

Any help would be appreciated.
Dec 27 '06 #2
ManningFan wrote:
This is something I haven't come across yet, but it's something I need
to do. Don't ask why, it's just got to get done.

I need to keep a table of all changes to a specific field in another
table. I've never dealt with anything like this. How would I get the
value that's in a field and then the value that it was changed to, and
pass both of them to a table? Well, I know how to pass them to the
table, but I don't know how I would store them both in variables.

Any help would be appreciated.
I have encountered such a request previously. typically a kneejerk
reaction to a problem that quickly blows over - likely before your
coding is complete. Suggest you ask the requestor what kind of report
they want of the change detail and to whom they want it delivered. You
might get lucky and find out the issue has blown over before you waste
your time.

If that doesn't work, I suggest you do the work AND create the report
and deliver a month's worth of transaction change detail to the person
who asked you to make the change. ('course make sure your resume is up
to date!)

Bob
Dec 27 '06 #3
Allen -
Good stuff. I was able to adapt your code to fit my needs. Thanks!

Allen Browne wrote:
Access lacks triggers, but if all changes are done in a form, you can use
the events of the form, to log the changes.

Example in:
Audit Trail - Log changes at the record level
at:
http://allenbrowne.com/AppAudit.html
Dec 27 '06 #4
Bob -
Unfortunately, there is a solid business reason for this request.
Believe me, I wish half of their requests would blow over, but they're
pretty responsible end users and rarely do they ask for something I
feel is useless.

Bob Alston wrote:
I have encountered such a request previously. typically a kneejerk
reaction to a problem that quickly blows over - likely before your
coding is complete. Suggest you ask the requestor what kind of report
they want of the change detail and to whom they want it delivered. You
might get lucky and find out the issue has blown over before you waste
your time.

If that doesn't work, I suggest you do the work AND create the report
and deliver a month's worth of transaction change detail to the person
who asked you to make the change. ('course make sure your resume is up
to date!)

Bob
Dec 27 '06 #5
ManningFan wrote:
This is something I haven't come across yet, but it's something I need
to do. Don't ask why, it's just got to get done.

I need to keep a table of all changes to a specific field in another
table. I've never dealt with anything like this. How would I get the
value that's in a field and then the value that it was changed to, and
pass both of them to a table? Well, I know how to pass them to the
table, but I don't know how I would store them both in variables.

Any help would be appreciated.
If I had to do this I would move the field to another table, related to
the original table in a many-to-one relationship.
example
Spouses

ID Person NewPartner DateTime EnteredBy
12 13 MaryBeth 2006-12-27 16:38 Mandrake the Magician

The new table would comprise of its own ID field, a field for the ID of
the parent table record, a data field, a date field and a user field.
The first of these would be an autonumber, the second defaulted to the
parent record and the last two defaulted to appropriate values. So only
the data would need to be completed.
So when entering a new value a user would do so in a sub form. All the
old values would remain in the child table.
And to get current data we would use a query which would get the most
recent value from the child table.
Depending on rules about polyandry and polygamy one might or might not
require an [end date] and [end entered by] as well.

Dec 27 '06 #6

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

Similar topics

3
1894
by: Ron Nolan | last post by:
I have a large application that contains lots and lots of financial history data. The history data is currently set up in a table called 'TblHist' that exists inside each of these three .mdb files. Each .mdb has approx. 175k rows in its history table. HistData2001.mdb - history data in TblHist for year 2001 HistData2002.mdb - history data in TblHist for year 2002 HistData2003.mdb - history data in TblHist for year 2003. (All .mdb's...
1
1580
by: Gomez | last post by:
I have set up two tables ****current and ****history. The history table contains all the fields which I want to track changes on. The current table contains just the most recent information from those fields (history not important). The entry forms are set up with a query to access each field from it's correct table. I have a 2 field primary key in the history table (field 1 is a facility ID, and field 2 is the date of inspection). ...
0
340
by: Daniel Devico | last post by:
Hye, Is there a way to keep in a log file the history of all data changes (for example keeping sql INSERT, DELETE or UPDATE) as would do dump, keeping trace of the user who did it and when ? Daniel
3
6757
by: Alan | last post by:
I have a form that contains many fields for the user to enter. After entering the data the user can click a link to open a new window, the new window contains six columns (pull down menu) and 30 rows to allow user choose their options. <SCRIPT LANGUAGE="JavaScript"> function win(QID) { msg=window.open("QuotationPE.asp?QID=" + QID ,"","height=600,width=800,left=80,top=80, scrollbars=yes"); }
8
2661
by: Ed Jay | last post by:
I want to use history.go() to navigate between my previously loaded pages. I'm looking for a way to trigger a function call when a page is accessed using history.go(). Is there an event generated? Is there a method for detecting what page the user came from when a page is accessed using history.go()? -- Ed Jay (remove M to respond by email)
6
5070
by: divya | last post by:
I have a page name edit.asp which should expire immediately .The user cannot open this page directly he has to provide a password for entering this page.thus when the user enters edit.asp , it has a button EDIT ,which when user clicks directs him to another page (done.asp). Now the problem is that from this page (done.asp) if he clicks on the back button on the toolbar then edit.asp opens.But I don't want it to open It should show page...
7
8351
by: mohammed.naghman | last post by:
Hi, I have 2 submit buttons in a jsp page. One of them takes me to page2.jsp and also passes the values enetered to page2.I have a link in the page2 that does a history.back to come to the previous page to make any chnages necessary. Now after making my changes, instead of going to page2.jsp if I want to submit the page, Instead of submitting the page it takes me to page2.jsp again. This problem is only with firefox. It works fine...
0
1622
by: =?Utf-8?B?bWtlbGx5NGNh?= | last post by:
I've spent quite some time searching for a way to prevent the browser from adding each of my postbacks to the History list, and have found several different methods to do that or something similar, all of which either don't do what I need or don't work at all. The closest solution is to enable SmartNavigation, but it causes my first postback to effectively be ignored, and it adds that first page view to the history. If I could figure out...
12
8117
by: jim.richardson | last post by:
Hi all, I'd like a page to be excluded from the back button history, that is, when a user hits their browser's back button, it never backs into this particular page. Can anybody please tell me how to do this? I thought perhaps there would be some kind of special meta tag that says something like "exclude me from browser's history", but have been
0
8380
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8296
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
8816
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
8710
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...
0
8598
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
7310
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
4150
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2721
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
1928
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.