您正在看的access教程是:当Access文件大于指定的大小时就自动压缩。
适用 Access2000及以后版本
翻译:tmtony(Access/Office中国)
首先在公共模块添加如下函数:
Public Function AutoCompactCurrentProject()
Dim fs, f, s, filespec
Dim strProjectPath As String, strProjectName As String
strProjectPath = Application.CurrentProject.Path
strProjectName = Application.CurrentProject.Name
filespec = strProjectPath & "" & strProjectName
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFile(filespec)
s = CLng(...[ 查看全文 ]