J
Joey
I am trying to compact my backend db from inside my front end db. I am using
the following code, and it seems to work OK when the database is an .MDB but
when I make the .MDB into and .MDE file, the code errors out because the .MDE
front end has the mde backend open already.
Does anyone know if you can compact in code in an .MDE??
I am beginning to think that I should just check "Compact on Close" (using
Access 2000) Thanks for any ideas.
-----------------------------------------------------------------------------
Function CompactDB(DBSourceName As String) As Boolean
Dim DbDestName As String
DbDestName = Left(DBSourceName, Len(DBSourceName) - 3) & "NEW"
DBEngine.CompactDatabase DBSourceName, DbDestName
Kill DBSourceName
Name DbDestName As DBSourceName
CompactDB= True
End Function
the following code, and it seems to work OK when the database is an .MDB but
when I make the .MDB into and .MDE file, the code errors out because the .MDE
front end has the mde backend open already.
Does anyone know if you can compact in code in an .MDE??
I am beginning to think that I should just check "Compact on Close" (using
Access 2000) Thanks for any ideas.
-----------------------------------------------------------------------------
Function CompactDB(DBSourceName As String) As Boolean
Dim DbDestName As String
DbDestName = Left(DBSourceName, Len(DBSourceName) - 3) & "NEW"
DBEngine.CompactDatabase DBSourceName, DbDestName
Kill DBSourceName
Name DbDestName As DBSourceName
CompactDB= True
End Function