Re: DB Backup and Restore
If it falls on a weekend and computers are oof then they are off and you cant do anything until theya rea turned on. What you can do is place a check to see what is the latest backup date/time and if its from te previous mointh then force a backup on whatever day they are turned on.
Re: DB Backup and Restore
You can declare them as public in a module, though you would have to assign them on start up or before you use them. You could assign them in a Public Sub in the same module and call that Sub on start up or before you use them, I normally have a Startup sub other than main, and that is called, so ikeep all my settings in there as well as Public Constants ..
Re: DB Backup and Restore
Quote:
Originally Posted by RobDog888
If it falls on a weekend and computers are oof then they are off and you cant do anything until theya rea turned on. What you can do is place a check to see what is the latest backup date/time and if its from te previous mointh then force a backup on whatever day they are turned on.
That is what I am looking for Robdog888.
Quote:
Originally Posted by rory
You can declare them as public in a module, though you would have to assign them on start up or before you use them. You could assign them in a Public Sub in the same module and call that Sub on start up or before you use them, I normally have a Startup sub other than main, and that is called, so ikeep all my settings in there as well as Public Constants
I am confused with your post #'s 38 and 39.
Re: DB Backup and Restore
FOR DATABASE BACK UP
VB Code:
Dim FS
Private Sub DRIVE1_Change()
DIR1.Path = DRIVE1.Drive
TxtFileName.Text = DRIVE1.Drive
End Sub
Private Sub DIR1_Change()
TxtFileName.Text = DIR1.Path
End Sub
Private Sub CSAVEBACKUP_Click()
On Error GoTo ErrorTrap
Set FS = CreateObject("SCRIPTING.FileSystemOBJECT")
FILENAME1 = App.Path & "\database\Salary_SYS.mdb"
If TxtFileName.Text <> "" Then
FS.COPYFILE FILENAME1, TxtFileName.Text & "\", 1
MsgBox "DataBase Backup Is Completed Successfully in " & TxtFileName.Text, vbInformation
End If
ErrorTrap:
If Err.Number <> 0 Then
MsgBox "Error (" & Err.Number & "): " & Err.Description, vbCritical, "Error"
End If
End Sub
:thumb:
Re: DB Backup and Restore
shakti5385 that part of backup is already finished. please read post #43.
Re: DB Backup and Restore
Re: DB Backup and Restore
Why should i edit the thread when the problem still has something to do with DB backup? read this part of the thread.
Quote:
Quote:
Originally Posted by RobDog888
If it falls on a weekend and computers are oof then they are off and you cant do anything until theya rea turned on. What you can do is place a check to see what is the latest backup date/time and if its from te previous mointh then force a backup on whatever day they are turned on.
That is what I am looking for Robdog888.
Re: DB Backup and Restore
Any sample code for it RobDog888?
Re: DB Backup and Restore
Is your app already running all the time or are you shceduling it to run every x number of days?
Re: DB Backup and Restore
My app will run everday except on non-working days like holidays.
Re: DB Backup and Restore
Write out to a small textfile the Date when it was backed up. then when your app starts check that date and if the date is not yesterday then run it or something like that.
Re: DB Backup and Restore
can you spare some code RobDog888?