[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Compressing a Microsoft Access Database

Posted on 1998-07-23
2
Medium Priority
?
177 Views
Last Modified: 2010-05-03
When using Microsoft access, you can go under the tool menu, and select Compress database whenever it needs done, but how Can I do that from Visual Basic?

0
Comment
Question by:ssteeves
2 Comments
 

Accepted Solution

by:
HenryChan earned 80 total points
ID: 1466534
Very simple,

    DBEngine.CompactDatabase "FROM.MDB", "TO.MDB"

Remember that you must open it exclusively. ie. No one is using the file.

0
 
LVL 1

Author Comment

by:ssteeves
ID: 1466535
Thanks very much.   That seems to do the trick.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month19 days, 23 hours left to enroll

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question