I've automated a table import to create "MyTable". It works fine, and it
also causes the creation of an "MyTable_ImportErrors" table with any import
problems.
I want to delete "MyTable_ImportErrors" (if it exists) before I execute the
import.
I believe the answer will be in "DoCmd.RunCommand acCmdDeleteTable" but I
can't find sufficient documentation about how to use it.
Suggestions?
Albert D. Kallal - 13 May 2008 14:55 GMT
Use sql commands:
try:
CurrentDb.Execute "drop table NameOfYourTable"\

Signature
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pleaseNOOSpamKallal@msn.com
NU_Dave - 13 May 2008 15:14 GMT
Excellent! Thank you for your response.
Dave
> Use sql commands:
>
> try:
>
> CurrentDb.Execute "drop table NameOfYourTable"\
Albert D. Kallal - 13 May 2008 14:56 GMT
bumped send key..you don't need that "\"
eg:
CurrentDb.Execute "drop table NameOfYourTable"
NU_Dave - 13 May 2008 14:58 GMT
Never mind!
I was able to do what I needed with;
DoCmd.RunSQL "drop table [MyTable_ImportErrors]"
> I've automated a table import to create "MyTable". It works fine, and it
> also causes the creation of an "MyTable_ImportErrors" table with any import
[quoted text clipped - 7 lines]
>
> Suggestions?