使用代码压缩后端数据库!
Public Sub 压缩后端数据库() '压缩后端数据
Dim StrFTemp As String
Dim StrFName As String
Dim Lstar As Long, Lend As Long
StrFName = "D:\PoseSky商业管理软件\PoseSky_be.mdb"
StrFTemp = "D:\PoseSky商业管理软件\temp001.mdb"
If Dir(StrFTemp) <> "" Then Kill StrFTemp
If Dir(StrFName) <> "" Then Name StrFName As StrFTemp Else MsgBox StrFName & "不存在,无法进行压缩!"
DBEngine.CompactDatabase StrFTemp, StrFName, , , ";pwd=密码"
Kill StrFTemp
End Sub