Solved

Compressing a Microsoft Access Database

Posted on 1998-07-23
2
144 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 20 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

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Search combo error "Data Type Mismatch in Criteria Expression" 2 63
Visual Studio 2005 text editor 10 38
Excel Automation VBA 19 70
backup program with robocopy 6 16
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

773 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