I need to compact a database and i am getting this error message, and i am the only one working on it.
Run-time error '3356': You attempted to open a database that is already opened exclusively by user Admin on machine FL111 try again when the database is available
Here is the code:
strBackupName = "testdatabase.mdb"
'-- Does today's backup exist?
If Dir(strBackupName) = "" Then
strDatabaseName = "c:\mydatabase.mdb"
DBEngine.CompactDatabase strDatabaseName, strBackupName
MsgBox "Database has been backed up to " & vbCrLf _
& "strBackupName"
Endif
Any help is appreciated
thanks
Run-time error '3356': You attempted to open a database that is already opened exclusively by user Admin on machine FL111 try again when the database is available
Here is the code:
strBackupName = "testdatabase.mdb"
'-- Does today's backup exist?
If Dir(strBackupName) = "" Then
strDatabaseName = "c:\mydatabase.mdb"
DBEngine.CompactDatabase strDatabaseName, strBackupName
MsgBox "Database has been backed up to " & vbCrLf _
& "strBackupName"
Endif
Any help is appreciated
thanks