Making a record of a CommandButtonClick

  • Thread starter Thread starter elli
  • Start date Start date
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
 
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.
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top