I have a very large database, which I want to compact on close SOMETIMES.
I know that there is the "Compact on Close" option in the tools of the database, but was hopping that I could do this through code so that I could prompt the user to be sure that they want to compact now.
In trying to solve this problem, I have found that I can compact a closed database through code. I therefore created a second very small database, which I was able to code to prompt the user and (if answered yes) compact the first database.
So my problem now is how do I close the first large database, and open the second smaller database in code?
In asking fellow developers, it was suggested that I create a batch file to open the first database and then the second.
I believe that there is a cleaner way to do this inside of Access.
Please help, knowing the total story above if anyone could suggest a totally different approach, I would be interested in that as well.