Results 1 to 5 of 5
  1. #1
    Ekhart is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jun 2016
    Posts
    80

    Update Field with Changes

    I have a form and when someone makes a change I have it log the changes to 2 specific fields. The problem, currently, is that it logs these 2 fields regardless if they were changed or somethings else was.


    I have this run on the 'BeforeUpdate' event for the form. I know I could put this on these fields only but what I really want is for this to log any and all changes made to any field if possible.

    Code:
    Me.LastEditedBy = (GetUserName & " on " & Date & " at " & Time() & ". Last Action set to " & Me.LA & " with Action Date of " & Me.DA & "." & vbCrLf & vbCrLf & Me.LastEditedBy)

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    Are you saving this info to a table?
    If you use Now instead of Date, you can get Date and Time.

    Can you tell us more about what you want to save (before and after values) and what the info will be used for?
    I'm not trying to be nosy, just trying to get details of the request.

    Have you considered tables data macros? Perhaps that would be overkill.

  3. #3
    Ekhart is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jun 2016
    Posts
    80
    This is saving to a table through the form yes. I just want it to mark what all fields were changed.

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    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. Replies: 1
    Last Post: 03-11-2018, 11:44 AM
  2. Replies: 1
    Last Post: 10-27-2016, 12:14 PM
  3. Replies: 1
    Last Post: 05-17-2013, 12:53 PM
  4. Replies: 2
    Last Post: 08-30-2012, 07:59 AM
  5. Update field in table after update on a subform
    By jpkeller55 in forum Queries
    Replies: 3
    Last Post: 09-30-2010, 08:02 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