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

Delete table, if present statement 1

Status
Not open for further replies.

vamoose

Programmer
Oct 16, 2005
320
MX
I am using Access 2000. Currently I am using this VBA code: DoCmd.DeleteObject acTable, "SAP_Import" to delete this table. I would like to know if this table is actually present before issuing the above command because I get an error if the table is not there to delete.

Thank you for any assistance.
 
You can look up a system table.

[tt]If IsNull(DLookUp("Name","MSysObjects","Name='SAP_Import' And Type=1")) Then
'Does not exist[/tt]

Type 1 is a local table.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top