View Full Version : condition statement before delete


zman1
09-07-2005, 09:11 AM
I wrote a macro that, prior to importing new records into a table, selects all records and deletes them. However, I need to include a condition statement that will prevent an error from occuring when the table is already empty. Thanks for any help.

KenHigg
09-07-2005, 09:14 AM
Is your macro simply running one or more append queries?

zman1
09-07-2005, 10:15 AM
I am running two transfer text commands using a "import text specification" to move comma delimited text into the 2 tables. I am trying to delete the records in these 2 tables so they are clean.

KenHigg
09-07-2005, 10:24 AM
Can you simply build a delete query and run it from the macro before the trf takes place?

zman1
09-07-2005, 12:29 PM
Ken, That worked just great! Thank you!

KenHigg
09-07-2005, 12:33 PM
.
.
.
Cool - :)