Identifying When Database Was Last Saved / By Whom

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

A tricky one I think. I have been asked whether or not it is possible to
show by either recording or displaying on the database when the database was
last modified and saved. I am aware of the standard "Last Modified" and
"Saved" function within MS Packages but I would like to have a field or
facility which would display this kind of information in a database more
precisely.

Reason behind this madness, is that sometimes my users say that they have
made modifications to data within my database and infact all that has
happened is that the database has been opened and closed.

Not very scientific unfortunately.

If anyone has any suggestions, I would be greatful.

Kieron
 
Kieron said:
A tricky one I think. I have been asked whether or not it is possible to
show by either recording or displaying on the database when the database was
last modified and saved. I am aware of the standard "Last Modified" and
"Saved" function within MS Packages but I would like to have a field or
facility which would display this kind of information in a database more
precisely.

Reason behind this madness, is that sometimes my users say that they have
made modifications to data within my database and infact all that has
happened is that the database has been opened and closed.


I recommend adding a date/Time field to each table of
interest. Then use the table's related form's BeforeUpdate
event to record when the record was saved:
Me.LastSaved = Now

Another, less discerning, approach is to log the forms'
BeforeUpdate event to a global variable and then update a
field in one row table in an always open form's close event.

One situation might be the reason why users think they
edited a record, but the change never appears in the table.
After they are done typing the change, they immediately
close Access and if the change they made is rejected by a
validation rule, there is no indication that the edit
failed.
 
Kieron White said:
Hi,

A tricky one I think. I have been asked whether or not it is possible to
show by either recording or displaying on the database when the database
was
last modified and saved. I am aware of the standard "Last Modified" and
"Saved" function within MS Packages but I would like to have a field or
facility which would display this kind of information in a database more
precisely.

Reason behind this madness, is that sometimes my users say that they have
made modifications to data within my database and infact all that has
happened is that the database has been opened and closed.

Not very scientific unfortunately.

If anyone has any suggestions, I would be greatful.

Kieron


The following routine will stamp the user name, date, & time in
the database's Sumary Info tab (File->Database Properties->Summary)

You can put it this in any of the various change events in order to
trigger it only when data is actually changed. I can't think of a way to
make this work if the user directly edits the tables. It will only work if
all I/O is handled through forms. You can then use this routine in the
form's/control's change events.



Public Sub Stamp()

Dim dbs As Database
Set dbs = CurrentDb

With dbs.Containers("Databases").Documents("SummaryInfo")
.Properties("Title") = dbs.Containers("Databases").UserName _
& " - " & Date & " - " & Time

End With

End Sub

--
 
Back
Top