I have a saved import to restore the database backup, however when this is run, the database size doubles because the old information was still in there. To prevent this, I would like to use VBA to clear out the table before it is repopulated with the import.
Code:
Private Sub Command4_Click()
' Deletes old information
StrSQL = "Delete * from Master Table;"
DoCmd.SetWarnings False
DoCmd.RunSQL StrSQL
DoCmd.SetWarnings True
' Imports infomation from pre-defined import
DoCmd.RunSavedImportExport ("Import Backup")
End Sub
[CODE]
From everything I’ve read, the StrSQL bit should remove the table’s contents, but either I typed something wrong, or left out something.
Any help would be greatly appreciated.
Thanks in advance,
-Huey