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

deleting object only if it exists 1

Status
Not open for further replies.

jommyjet

Technical User
May 19, 2003
49
0
0
US
I imagine this is very simple. I want to delete the table if it exists.
I bet it's something similar to this

If IsObject(updateresourcelist) = True Then
DoCmd.DeleteObject acTable, "resourcelist"
Else
End If

Thanks for the help. Also, as this being easy, can anyone recommend a good resource book. I biought a VBA handbook and it reads like garbage
 
Sub delete_table()
On Error GoTo Err_delete_table
CurrentDb.Execute ("drop table table1")

Exit Sub

Err_delete_table:
Debug.Print "Table not found"


End Sub
 
Hi mpastore,

You make it seem so easy.

jommyjet, what's the problem with saying thanks to mpastore.

Babs
 
thank you mpastore, because you are helpful, not because babs recommends it
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top