Results 1 to 7 of 7
  1. #1
    Join Date
    Jun 2006
    Posts
    72

    Unanswered: Record update date

    Is there a way with access 2003 to determine when a record or maybe even a particular field has last been updated?

  2. #2
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    No.

    Stupid 10 characters minimum thing forces me to write more characters so this entire sentence is total spam just to get around the dumb limit!
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  3. #3
    Join Date
    Sep 2008
    Posts
    7
    You would need to have a field in the table that stores the time stamp.

    Date/Time with field properties as type Now() or Date().

    The last record should be designated as the one
    with the biggest/newest timestamp,

    SELECT TOP 1 * FROM [mytable] ORDER BY [mytimestamp] DESC;

    This should give you a recordset containing one row of data - the most recent record. Otherwise you can just order the results by the time-stamp...

  4. #4
    Join Date
    Jun 2006
    Posts
    72
    Quote Originally Posted by johnny773
    You would need to have a field in the table that stores the time stamp.

    Date/Time with field properties as type Now() or Date().

    The last record should be designated as the one
    with the biggest/newest timestamp,

    SELECT TOP 1 * FROM [mytable] ORDER BY [mytimestamp] DESC;

    This should give you a recordset containing one row of data - the most recent record. Otherwise you can just order the results by the time-stamp...
    This is more or less what I was thinking about doing. I just wanted to see if there was a better alternative.

    Thanks for this info guys.

  5. #5
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Access/JET doesn't have an equivalent of a tmestamp built into the db engine. so you have to do that yourself, as Johnny73 proposes. but you have to bear in mind that that will only work whn someone acess your tabel through the module (form) that sets the timestamp. if soemone were to edit /update the able directly, outside the form then the timestamp would not be set.

    there ae techniques you can use to reduce that risk/exposure, but im not convinced that you can totally desing out the risk shot of switching your data store to a server back end such as SQL Server or MySQL
    I'd rather be riding on the Tiger 800 or the Norton

  6. #6
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Quote Originally Posted by johnny773
    You would need to have a field in the table that stores the time stamp.

    Date/Time with field properties as type Now() or Date().

    The last record should be designated as the one
    with the biggest/newest timestamp,

    SELECT TOP 1 * FROM [mytable] ORDER BY [mytimestamp] DESC;

    This should give you a recordset containing one row of data - the most recent record. Otherwise you can just order the results by the time-stamp...
    Just playing devils advocate (making sure you've thought about this).

    What happens when there are two records with the same mytimestamp value?
    George
    Home | Blog

  7. #7
    Join Date
    Sep 2008
    Location
    Amherst NY (near Buffalo)
    Posts
    11
    Just make the TimeStamp field these guys are talking about, and then in the AfterUpdate event of the field(s) you care about, change the TimeStamp - or even do it in the BeforeUpdate event for the whole Form to track any changes.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •