Results 1 to 4 of 4
  1. #1
    accessbro is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jul 2014
    Posts
    23

    Creating new record when record is edited

    I'm working on a project that has project start / end dates which can change. A report is created based on this data. The customer wants me to save all changes as a new record and disregard the older record when the report is created. I was thinking that I would add a (yes/no) column that marks the new record as the most recent (yes) and marks older records as (no). Then I would modify the query for the report to only include records with 'yes' set to true. I was also thinking that I should create a second table that has a foreign key for the original record from the main table. The main table would have the most recently edited record while the second table would have the previous records. Which method should I use? Are there any other methods that are better / more efficient?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    I would not use separate tables. A yes/no field is one approach.

    Maybe should look at audit log, review: http://allenbrowne.com/AppAudit.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    accessbro is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jul 2014
    Posts
    23
    That link you posted looks like it uses separate tables.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Sorry, yes it does. It's been a while since I looked at that procedure and forgot that it actually duplicates the record with additional fields for date/time/user info. Some audit logs take a slightly different approach but still use a second table. I retract my original statement. Does look like another table is necessary for an audit log, which is really what you described in your original post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. close a form if record is open and being edited
    By Ruegen in forum Programming
    Replies: 9
    Last Post: 08-15-2014, 01:36 AM
  2. creating an edited record report
    By mike02 in forum Access
    Replies: 4
    Last Post: 06-13-2013, 08:36 AM
  3. Replies: 9
    Last Post: 05-12-2012, 12:16 PM
  4. Replies: 1
    Last Post: 04-24-2012, 02:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums