A handy function for your VB/VBA toolbox:function Exists(coll as object, Value as variant) as boolean dim o as object on error goto e o = coll(Value) Exists = True exit function e: Exists = Falseend Function
that accepts any collection and checks to see if the value exists in the collection, and returns a true/false. A having to use "on error" to check this is a big oversight of the collection object in VB in my opinion.Anyway, to see if a table exists in Access:if Exists(currentdb.tabledefs, "TableNameHere") then ....
enjoy!- Jeff