Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / May 2008

Tip: Looking for answers? Try searching our database.

Documentation for--> DoCmd.RunCommand acCmdDeleteTable ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
NU_Dave - 13 May 2008 14:48 GMT
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?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.