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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

? Macro Condition to ck existance of table

Status
Not open for further replies.

MrJette

Programmer
Feb 14, 2003
1
US
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

I use this to delete import error tables
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top