Compact DB

T

Tom

Hi all,

I have a button that run a vb query statement to delete records.
I would like to compact the DB after deletion.

1. is it recommended?
2. what code line I should add?

Thanks,
Tom
 
T

Tom

I found: Me.Application.CompactRepair
It`s sound right, but will it do the job?

Thanks,
Tom
 
T

Tom

I found: Me.Application.CompactRepair
It`s sound right, but will it do the job?

Thanks,
Tom
 
D

Douglas J. Steele

You cannot use the CompactRepair method to compact a database if it's
currently open. However, if you've followed proper design, so that your
application is split into a front end (containing the queries, forms,
reports, macros and modules), linked to a back end (containing the tables
and relationships), the front end can compact the back end (provided, of
course, that the back end isn't current in use: you can tell by whether or
not the ldb locking file exists for the back end)
 
D

Douglas J. Steele

You cannot use the CompactRepair method to compact a database if it's
currently open. However, if you've followed proper design, so that your
application is split into a front end (containing the queries, forms,
reports, macros and modules), linked to a back end (containing the tables
and relationships), the front end can compact the back end (provided, of
course, that the back end isn't current in use: you can tell by whether or
not the ldb locking file exists for the back end)
 
T

Tom

Thanks.

Douglas J. Steele said:
You cannot use the CompactRepair method to compact a database if it's
currently open. However, if you've followed proper design, so that your
application is split into a front end (containing the queries, forms,
reports, macros and modules), linked to a back end (containing the tables
and relationships), the front end can compact the back end (provided, of
course, that the back end isn't current in use: you can tell by whether or
not the ldb locking file exists for the back end)
 
T

Tom

Thanks.

Douglas J. Steele said:
You cannot use the CompactRepair method to compact a database if it's
currently open. However, if you've followed proper design, so that your
application is split into a front end (containing the queries, forms,
reports, macros and modules), linked to a back end (containing the tables
and relationships), the front end can compact the back end (provided, of
course, that the back end isn't current in use: you can tell by whether or
not the ldb locking file exists for the back end)
 

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