How to compact a database using macro or vba? in Access Database General Questions  
 |  Edit my Profile  |  Help
 
     
  
 
 
 
Rodrigo Borges 6/9/2007 5:30 AM PST
  Question
  I have a DB tht loads a form when opened. I want to run a compact DB every
time I open and close the DB.

Is there a away to accomplis that using macro?
 
  Was this post helpful to you?  
 
 
  Reply | Print post   TopTop  
 
 
 
 
Wayne-I-M  6/9/2007 5:44 AM PST
  Answer
  Hi Rodrigo

You don't need a macro.

Use
Tools
Options
General
Compact on Close.

It would be pointless compacting on open in this case - as the DB has
already been compacted last time it was closed.

--
Wayne
Manchester, England.



"Rodrigo Borges" wrote:

> I have a DB tht loads a form when opened. I want to run a compact DB every
> time I open and close the DB.
>
> Is there a away to accomplis that using macro?
>
 
  Was this post helpful to you?  
 
 
  Reply | Print post   TopTop  
 
 
 
 
Mick 10/22/2008 12:42 AM PST
   
  The question as I understood it asked HOW to compact and repair in Access
2007 not should you!

I am a Developer and would regularly compact the database in 2000-2003
format since I move alot of data around.

QUESTION: How does one compact and repair a database with a macro or vba
 
  Was this post helpful to you?  
 
 
  Reply | Print post   TopTop  
 
 
 
 
Stefan Hoffmann 10/22/2008 1:18 AM PST
   
  hi Mick,

Mick wrote:
> The question as I understood it asked HOW to compact and repair in Access
> 2007 not should you!
???

> I am a Developer and would regularly compact the database in 2000-2003
> format since I move alot of data around.
>
> QUESTION: How does one compact and repair a database with a macro or vba
GIYF:

http://support.microsoft.com/kb/230501
http://msdn.microsoft.com/en-us/library/bb237197.aspx



mfG
--> stefan <--
 
  Was this post helpful to you?  
 
 
  Reply | Print post   TopTop  
 
 
  Return to Microsoft Communities  Notify me of replies