Delete Table using macro

A

Alison

I would use deleteobject object type is table and then
object name is the table name.

Hope this is what you are after.

cheers

Alison
 
J

JMCN

Alison said:
I would use deleteobject object type is table and then
object name is the table name.

Hope this is what you are after.

cheers

Alison

hello,
i have a question regarding the deleteobject macro. is it possible of
deleting only the data and not the object/table? would it be better
to create an update query and vb instead of a macro??

thanks in advance,
jmcn
 
S

Steve Schapel

JMCN,

You can use a Delete Query for this, and you can use the OpenQuery
action in a macro to run the Delete Query.

- Steve Schapel, Microsoft Access MVP
 
J

JMCN

Steve Schapel said:
JMCN,

You can use a Delete Query for this, and you can use the OpenQuery
action in a macro to run the Delete Query.

- Steve Schapel, Microsoft Access MVP

Steve,

Thanks for the advice. I created the delete query and used the
OpenQuery action in the macro to run the Delte query:) Then the next
step is importing the data from Excel to Access, which works out
perfectly well with TransferSpreadsheet action in my macroImportExcel.

Thanks again!!!
JMCN
 

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