How I Can make a copy of access whith a limited time

root7

Registered User.
Local time
Today, 01:32
Joined
Jun 18, 2009
Messages
12
How I Can make a copy of access whith a limited time for example if the time become 2:00 clock will be maken a copy of access in a folder I will choos and then it will replace this access even if open
 
Can you explain, in a little more detail, what the purpose of replacing the database at a specific time, even if a user is using it, would be?
 
get copy for the database After Update
 
If you mean make sure that everyone has the latest copy of the frontend after you've made changes, why not use something like an auto updater.

Bob Larson has a free tool which will turn your frontend into an auto updating frontend. Or Tony Toews has a free auto updater which runs differently but will essentially do the same.
 
Want copy database by vb6 not by access
Thank you
 
Here is a snippet of code used in VB6 to make a copy of a database

Code:
Private Sub BtnBackup_Click()
Dim nFile As String
nFile = Me.TxtNewMdb & "\" & Me.TxtFileName
If Dir(nFile) <> "" Then
    If MsgBox(nFile & " already exists, do you want to overwrite it?", vbExclamation + vbYesNo, "Duplicate File Found") = vbYes Then
        Kill Dir(nFile)
    Else
        Exit Sub
    End If
End If

FileSystem.FileCopy "C:\Program Files\Club Manager\ClubData.mdb", nFile
MsgBox "Back up of data complete", vbInformation + vbOKOnly, "Club Manager ©"
Unload FrmBackup

End Sub
 
Thank you, this is code take copy from database but not in specific time.
e.g. i want run program in 2 a.m. and take copy from database.
Thank you again for help me.
 
What you really want is a schedule setting up to commences at 2am that runs a batch file that does the copy.

David
 
If you set up a schedule in MS scheduler

Start > Settings > Control Panel - Scheduled Tasks.

Then add a new task this should do it for you. Don't know if will copy an open database though.

David
 
You can't overwrite an open database. It won't work. You would have to implement some sort of kick out mechanism. There is a sample one here.
 

Users who are viewing this thread

Back
Top Bottom