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 / Forms Programming / November 2005

Tip: Looking for answers? Try searching our database.

Deleting Table Contents in a different file

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chase - 22 Nov 2005 13:40 GMT
Without linking to another database, how do you delete the contents of a
table in one database as part of a process in a second database?
Marshall Barton - 22 Nov 2005 15:14 GMT
>Without linking to another database, how do you delete the contents of a
>table in one database as part of a process in a second database?

A rather dangerous thing to do so make sure you have made a
copy of the other mdb file first.

You can use the IN phrase in a Delete query's From clause:

DELETE *
FROM thetable
    IN "pathtoothermdb"

Signature

Marsh
MVP [MS Access]

Chase - 22 Nov 2005 16:29 GMT
Thanks but I get the following error 3131 Syntax error in FROM clause.
hears the code
StrSQL = "DELETE tblPropertyCopy.* FROM tblPropertyCopy
                         IN C:\VolumeDatabase\WarehousePropertyCopy.mdb;"
   
   CurrentDb.Execute StrSQL

> >Without linking to another database, how do you delete the contents of a
> >table in one database as part of a process in a second database?
[quoted text clipped - 7 lines]
> FROM thetable
>     IN "pathtoothermdb"
Marshall Barton - 22 Nov 2005 21:52 GMT
You forgot the quotes around the path:

StrSQL = "DELETE tblPropertyCopy.* FROM tblPropertyCopy
      IN ""C:\VolumeDatabase\WarehousePropertyCopy.mdb"""

BTW, an obscure, archaic, alternative syntax is:

StrSQL = "DELETE tblPropertyCopy.*  FROM " & _

"[C:\VolumeDatabase\WarehousePropertyCopy.mdb].tblPropertyCopy"
Signature

Marsh
MVP [MS Access]

>Thanks but I get the following error 3131 Syntax error in FROM clause.
>hears the code
[quoted text clipped - 14 lines]
>> FROM thetable
>>     IN "pathtoothermdb"
 
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.