tacieslik
Registered User.
- Local time
- Today, 15:02
- Joined
- May 2, 2001
- Messages
- 244
I have the following code for taking periodic backups:
Using a simple application with a form timer and the code above, a table is imported from another application into the backup app tempoarily and then exported to the destination application. This is done every 30 seconds ish.
What I need to do is allow for the unlikely event that the PC is switched off!
If this is the case, I currenctly get On Timer event errors. What I'd like is for a dialog to display (just to let a user know), but for the code to keep trying every 30 seconds.
Does this make sense?
Can you help?
TIA
Code:
Function ImportInventory()
Dim strHost1Path As String
strHost1Path = DLookup("fldConfigValue", "tblConfig", "[fldConfigName]='Host1Path'")
DoCmd.TransferDatabase acImport, "Microsoft Access", _
strHost1Path, acTable, "tblInventory", "tblInventory", False, False
Call ExportInventory
End Function
Function ExportInventory()
Dim strHost2Path As String
strHost2Path = DLookup("fldConfigValue", "tblConfig", "[fldConfigName]='Host2Path'")
DoCmd.TransferDatabase acExport, "Microsoft Access", _
strHost2Path, acTable, "tblInventory", "tblInventory", False, False
DoCmd.DeleteObject acTable, "tblInventory"
Forms!frmMirror.TimerInterval = DLookup("fldConfigValue", "tblConfig", "[fldConfigName]='BackupTimer'")
End Function
Using a simple application with a form timer and the code above, a table is imported from another application into the backup app tempoarily and then exported to the destination application. This is done every 30 seconds ish.
What I need to do is allow for the unlikely event that the PC is switched off!
If this is the case, I currenctly get On Timer event errors. What I'd like is for a dialog to display (just to let a user know), but for the code to keep trying every 30 seconds.
Does this make sense?
Can you help?
TIA
Last edited: