Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2004

    Question Unanswered: View Date/Time of Update

    Hey there,
    I'd like to show, on a form in Access, the date and time of the last update to the tables ....

    I usually update the tables and a regular basis, but it would help tremendously if the users know exactly the last time they were updated. I've tried using a macro and update query to update a seperate table, and I've reviewed previous posts, but all to no avail.
    Any help appreciated!

  2. #2
    Join Date
    Dec 2003
    Dallas, TX


    Hi Reg and "Welcome to the Forum"

    What you are wanting I have done myself, though may not be the best of ways, but the end result is that IT WORKS.
    First, in your Table make a field named something like LastModified and set it as Date/Time.
    Next, go to that Form in DesignView and pull that field onto the Form wherever you like.
    Now, create a new Module for that form and place the below Function in it:

    ' modGlobal_Form_BeforeUpdate created by "BUD" 12-12-2004.
    'This was created to Update the Form to show the last time it was modified.
    ‘By modified meaning is when something was actually changed and saved
    'to the form.  
    'This was part of a larger GlobalForm module I was using.
    Function modGlobal_Form_BeforeUpdate()
    On Error GoTo modGlobal_Form_BeforeUpdate_Err
        With CodeContextObject
            ' Updates the control DateModified to show date record was last updated.
            .DateModified = Now()
        End With
        Exit Function
        MsgBox Error$
        Resume modGlobal_Form_BeforeUpdate_Exit
    End Function
    That's all there is to it. So now, whenever you make any kind of change in your form it will show you the Date and Time, (also remains in the table).

    Hope this helps you with what you want. Wanted to give it a try anyway.
    have a nice one,
    Last edited by Bud; 12-12-04 at 06:51. Reason: Control the long text line, shortened it for readability

Posting Permissions

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