In Access 2000, go to tool, options , General tab, and select compact on close.dreamz said:Hi
does anyone know how i would make my database compact & repair itself either when i open or close it?
tried to do it via a macro but it says that it can't compact and repair when a macro is running
![]()
dreamz said:Thanks a Mill![]()
![]()
![]()
dreamz said:okay sorry, that doesn't work so well.
i need it to compact & repair. just compact on exit doesn't decrease the size of it![]()
Compact & Repair does though
dreamz said:i did the tools-options-general-compact on close.
when the db closed, it compacted but the size didn't change.
i opened it again & did the compact and repair and it dropped in size from 96megs to 4megs, which makes me think the compact on close function didn't work.
selenau837 said:Wow, that is a HUGE difference. It went down 92megs in size. Holy cow!
Anyways, I went and did a compact and repair on some of my back-ups, but it didn't change the size. I am guessing it is because they get compacted each time someone closes it.
I am sure we will find out the answer soon enough.
dreamz said:thats coz i deleted the contents of my table 1st![]()
DoCmd.RunCommand (acCmdCompactDatabase)
Docmd.RunCommand (acCmdRepairDatabase)