Macro to delete Table - table lock message by Access

P

pele

I have a form linked to a table (the name is [Manual Temp
File]) in which the user can add more records. There is a
command button on this form linked to a macro that will
append the contents of this table to another table. After
the append, I then try to delete the [Manual Temp File]
table and replace it with a blank copy of the same table
structure.

Before doing deleting the table, I make sure that teh
macro closes all the forms and queries that might have
been used this table.

Unfortunately, Access selects the table but it won't
delete it and a window pos up. The window says: "The
database could not lock Table Manual Temp File because it
is already in use by another person or process"

Can anybody tell me what could be going and what I can do.
Thanks.

Pele

The
 
C

Chris Reveille

Instead of deleting the table why not delete the records
with a delete query?

Chris
 
P

Pele

Chris,

Thank you very much. I didn't even think of that; it was a
better solution and it worked.

Pele

-----Original Message-----
Instead of deleting the table why not delete the records
with a delete query?

Chris
-----Original Message-----
I have a form linked to a table (the name is [Manual Temp
File]) in which the user can add more records. There is a
command button on this form linked to a macro that will
append the contents of this table to another table. After
the append, I then try to delete the [Manual Temp File]
table and replace it with a blank copy of the same table
structure.

Before doing deleting the table, I make sure that teh
macro closes all the forms and queries that might have
been used this table.

Unfortunately, Access selects the table but it won't
delete it and a window pos up. The window says: "The
database could not lock Table Manual Temp File because it
is already in use by another person or process"

Can anybody tell me what could be going and what I can do.
Thanks.

Pele

The
.
.
 

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