I keep that type of information right in the data dbf. I use two fields, Effective & Terminate to track dates. New records are effective today and terminate on 12/31/9999. Modified records have their termination date changed to today and the replacement record becomes effective 1 second later and expires on 12/31/9999.
To find the current record, you filter/index/whatever on termination date=12/31/9999 This has the benefit of being able to show the complete change history of a particular db item just by browsing for some-key-field = value-of-interest. You can also add a field for who updated the record. Comparing the values for old v. new to determine if a change is made is still a problem but no different than it would be for a separate logging program. You can also set up a filter on the main dbf to pull records between two dates. This type of arrangement is very good for keeping track of things that are subject to frequent changes, like gasoline prices. Also, if you have to re-create a transaction or report as of a certain date, you can pull just that record and get the actual values in use on that day without having to go through a separate table to figure out what changed and when. HALinNY -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Madigan Sent: Wednesday, June 14, 2006 13:45 To: ProFox Email List Subject: Logging changes in FPW 2.6 OK, so I want to add a logging feature to my collection program so that everytime there is a change to any field on the database, a date, time, and workstation name will be recorded along with the before and after values. Now I can go ahead and add code to each field on each screen, or I can compare a before and after after leaving each screen. Does anyone have a function or procedure to do this? I'm sure I can write a program that will create an array of values, compare each value, and copy the results to a log file, but I'd like to save some time writing this. Anybody have that already? **** New Lower Prices ***** Horse Racing Photos at http://michaelmadigan.exposuremanager.com/ [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

