Copyfile

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

Guest

I need help with this copyfile command. I have a form with a button that
will run this code. I want to copy the current active database as a backup.
So I understand that I need to first close the database then do the copyfile.
The problem I have is if I run a docmd.quit, it closes out access and it
will then not run the rest of the code to copy the database. Is there
another close command I can use to get this to work??

thanks in advance
Joe
 
Joe said:
I need help with this copyfile command. I have a form with a button that
will run this code. I want to copy the current active database as a backup.
So I understand that I need to first close the database then do the copyfile.
The problem I have is if I run a docmd.quit, it closes out access and it
will then not run the rest of the code to copy the database. Is there
another close command I can use to get this to work??


You can not make a reliable copy of an open database,
regardless of how you copy it.

You can not close a database and expect its code to continue
running.

Putting that information together means that the copying
should be done as a separate operation after the database
has been closed, not part of the application.
 
Back
Top