Compact the Database

J

John C.

I have a database that is used by several people. At any
given time, someone has the database open for use.

I need to be able to perform database maintenance
(compact) to reduce the size of the file.

(1) Any way of doing compact while someone has the
database open?

(2) Can I close them out, via VBA code, to allow database
maintenance? I have code that tells me who (userid) and
where (machine ID).
 
S

Sam

John C. said:
I have a database that is used by several people. At any
given time, someone has the database open for use.

I need to be able to perform database maintenance
(compact) to reduce the size of the file.

(1) Any way of doing compact while someone has the
database open?
Nope, not that I know of.
(2) Can I close them out, via VBA code, to allow database
maintenance? I have code that tells me who (userid) and
where (machine ID).
I've done this often using a timer on a form that's always open (probably
also hidden). This form checks for a value held in a 'GetOutNow' field
somewhere in the DB. You set this value to indicate you want everyone to
exit. If the timer event detects the value then it displays an appropriate
warning message, if they don't exit within a reasonable time then have the
timer event close the DB.

HTH
Sam
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top