如何使用VBA压缩当前数据库 [英] How can I compact a current database using VBA
本文介绍了如何使用VBA压缩当前数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
HI,
我正在运行几个VBA代码模块。在运行过程中,代码崩溃,因为Access的最大大小为2GB;但是,如果我在那时压缩数据库它只有200MB。
如何在间隔期间定期压缩数据库
问候
atks
解决方案
@atksamy
- 工具==>选项==>一般==> Compact on Close在关闭时自动压缩/修复数据库。
- 应用程序对象的CompactRepair方法
@ADezii
感谢您的回复
我正在通过vba代码自动查看。我面临的问题是我收到一条消息,说这不能在vba中或数据库打开时完成。如果我关闭数据库,那么我将无法运行模块中的其余代码
@atksamy
从当前数据库中的 ''打开表单'' ,执行以下语句:
展开 | 选择 | Wrap | 行号跨度>
HI,
I am running a few modules of VBA code. In the middle of running the code crashes as Access reaches its max size of 2GB; but, if I compress the database at that point it is only 200MB.
How can i compact the database regularly in the interval
regards
atks解决方案@atksamy
- Tools ==> Options ==> General ==> Compact on Close to automatically Compact/Repair a Database when it is closed.
- CompactRepair Method of the Application Object
@ADezii
Thanks for replying
I am looking into a automatic way through vba code. The problem i face is I get a message that this cant be done in vba or when database is open. If i close the database then I wont be able to run the remainder of the code from the module
@atksamy
From an ''Open Form'' in the Current Database, execute the following Statement:
Expand|Select|Wrap|Line Numbers
这篇关于如何使用VBA压缩当前数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取
|
15天全站免登陆