query to erase data?

  • Thread starter Thread starter scott
  • Start date Start date
S

scott

I have 2 queries...both append to a table...I then have a macro that
sends the info to my boss

I have been manually going in to delete all the records in the table
so I can run it again with other accounts.

is there a way to create a query that will erase all data in the
query?

then I can have a macro that sends the info then erases the info in
the table for next time.

thanks
Scott
 
This is going to sound crazy but where would I put that
line of code?

also would it be like this?
Delete * from invoice

I am not too sure how to work code.

Thanks
Scott
 
Hi,
It's just a SQL statement which is a query.
Create a new query, then just close the table picker dialog.
Click on SQL in the upper left corner (the view button).
Then just type in:
Delete * from invoice

Save it, then you can run it from a macro or however you like.
 
Back
Top