
Signature
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Hey Rick,
Thanks again for your reply...we use Citrix to access the database, so I
guess running the compact as a task would be the best bet.
By the way, how exactly would you do that? I see Access in the scheduled
tasks, but that would probably open Access, wouldn't it?
Not sure how to write a script,
John.
> > Hello,
> >
[quoted text clipped - 18 lines]
> *automatic* compacting a non-starter unless you want to schedule a task to run
> after hours.
Rick Brandt - 08 Feb 2005 02:15 GMT
> Hey Rick,
>
[quoted text clipped - 5 lines]
>
> Not sure how to write a script,
You could schedule a batch file that would run the JetComp utility. Also, you
could build a separate Access app that used an AutoExec macro to run code. That
code would use Dir to test for the existence of the ldb file for your back end
file. Non-existence would indicate no one was using the file.
The app could then use the DBEngine.CompactDatabase method to compact the data
file and then close itself. This method cannot compact the file "into itself"
like you can with the GUI so you would need to compact into a temp name and then
use the Name statement to change the name back to the original.

Signature
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Access rookie - 08 Feb 2005 04:01 GMT
Hey Rick,
Thanks for your post; I'll be doing research on how to get this done.
Optimistic,
John.
> > Hey Rick,
> >
[quoted text clipped - 15 lines]
> like you can with the GUI so you would need to compact into a temp name and then
> use the Name statement to change the name back to the original.