I friend has written a small bit of code I have listed below that creates a new database on a floppy disk. This works fine, however if this database already exists on the floppy it errors as it will not write over the top of it. Can anyone add to this code that will force the creation of the new database over the top of the existing one. I am using this as a means of backing up. This code only allows you to copy to blank disks each time. I would like to be able to use the same disk and write over the top each time.
PLEASE HELP I DON'T KNOW ANYTHING ABOUT CODE..
Function Create_Teacher_Disk()
Dim DefaultWorkspace As Workspace
Dim CurrentDatabase As Database, MyDatabase As Database
Set DefaultWorkspace = DBEngine.Workspaces(0)
Set CurrentDatabase = DefaultWorkspace.Databases(0)
On Error GoTo Err_TEACHER_Click
' Create new, encrypted database.
Set MyDatabase = DefaultWorkspace.CreateDatabase("a:\teacher.mdb", DB_LANG_GENERAL, DB_ENCRYPT)
End Function
PLEASE HELP I DON'T KNOW ANYTHING ABOUT CODE..
Function Create_Teacher_Disk()
Dim DefaultWorkspace As Workspace
Dim CurrentDatabase As Database, MyDatabase As Database
Set DefaultWorkspace = DBEngine.Workspaces(0)
Set CurrentDatabase = DefaultWorkspace.Databases(0)
On Error GoTo Err_TEACHER_Click
' Create new, encrypted database.
Set MyDatabase = DefaultWorkspace.CreateDatabase("a:\teacher.mdb", DB_LANG_GENERAL, DB_ENCRYPT)
End Function