Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you Delete Records in table using a Macro??

Status
Not open for further replies.

jmorlock

Programmer
Apr 25, 2003
46
US
Is it possible to delete all the records within a table using a macro or possibly some code? everytime that i import data into the table i want to clear the table of all the old records.
Thanks in advance.
Jeremy
 
How do you make a delete query, They mention it in the books that i have but they do not say how to do it. I really appreciate the help..
 
In the design view, go to queries.

Click new.

Choose simple query wizard.

Create the query and on the last dialog box, click on modify the query design.

Click on query/delete query and then save your query.

Let me know if this works.

Judge Hopkins

"...like hunting skunks underwater...."
John Steinbeck, The Grapes of Wrath
 
In a macro do this...


RunSQL "DELETE [table name].* FROM [table name]"

-al
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top