Making a record of a CommandButtonClick

E

elli

Hi!
I managed to make a button that makes a copy from the database and saves it
somewhere else. Now I'm wondering is there a way to keep track of then it
was last saved....
It overwrites the excisting copy, so there is only one copy at the time...
Any help?

elli
 
F

fredg

Hi!
I managed to make a button that makes a copy from the database and saves it
somewhere else. Now I'm wondering is there a way to keep track of then it
was last saved....
It overwrites the excisting copy, so there is only one copy at the time...
Any help?

elli

If you just want to know the date when the last time the database was
saved, add a table to your database. Add one field:
[LastSaved] DateTime
Name the table tblSavedDate

Code the command button on the form that saves the database (after the
code that actually saves the database runs):

currentDb.Execute "Update tblSavedDate set tblSavedDate =
Date();",dbFailOnError

Add error handling so that you do not update the table unless the
database was successfully saved.
 
E

elli

Thank U very many:))

-e-


fredg said:
Hi!
I managed to make a button that makes a copy from the database and saves
it
somewhere else. Now I'm wondering is there a way to keep track of then it
was last saved....
It overwrites the excisting copy, so there is only one copy at the
time...
Any help?

elli

If you just want to know the date when the last time the database was
saved, add a table to your database. Add one field:
[LastSaved] DateTime
Name the table tblSavedDate

Code the command button on the form that saves the database (after the
code that actually saves the database runs):

currentDb.Execute "Update tblSavedDate set tblSavedDate =
Date();",dbFailOnError

Add error handling so that you do not update the table unless the
database was successfully saved.
 
Top