How do I do it? I want to delete the objects but I dont know how without doing it manually.
How do I do it? I want to delete the objects but I dont know how without doing it manually.
You just have to substitute in a partial string from the name of your error tables where SearchString isCode:Dim db As Database Dim tdefs As TableDefs, tdef As TableDef Dim sTablename as string Set db = CurrentDb For Each tdef In db.TableDefs sTableName = tdef.Name if instr(sTablename, "SearchString") >0 then db.execute "DROP TABLE " & stablename endif Next tdef db.Close Set db = Nothing
This link may also help.
http://www.access-programmers.co.uk/...35&postcount=4
can I do wildcards? The imports have dates in the names and so the errors have dates in them. Or can I specify the name of the error tables?
Do these error table names have a common format/name? Perhaps you could show an example.
rpeare has given the code required, you could make it a function and call it in a loop, or you could identify the name pattern and process the names directly in a loop.
Is there any need to identify that you have deleted these tables (audit log)?
I was able to get rid of all the data impacting erros, but the errors im getting now dont seem to be impacting the data. They are "unparsable Record" errors.
??? I'm not following exactly what error tables we're talking about?? Can you post an example?
I don't have Acc2010, I have 2003.
My code will drop the automatically generated system tables (ImportError, ImportError2 etc, I forget the naming convention) you just have to put in the correct string and it will delete all of the existing tables with that string when you run the code.
I found a way to just fix the errors coming up. I am no longer getting errors on the DB.