I want to use a Macro to delete a table but sometimes the table doesn't exist and the Macro Halts. I need a Macro Condition that checks for the existance of the table in order to execute the DeleteObject action. What is the Condition statement? TIA!
Easy in VBA but not macros. Have you thought of using the macro runcode to get the answer?
-------------------------------------
scking@arinc.com
Try to resolve problems independently
Then seek help among peers or experts
But TEST recommended solutions
-------------------------------------
I use a form to perform that task and it works great.
At the end of My DoSomething macro I open my DeleteTable form.
I set the timer interval in the form to 5000
I put this in the "On Timer" event procedure
Private Sub Form_Timer()
On Error Resume Next
DoCmd.DeleteObject acTable, "TableName"
DoCmd.DeleteObject acTable, "TableName1"
DoCmd.DeleteObject acTable, "TableName2"
DoCmd.Close acForm, "DeleteTable"
End Sub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.