Clearing Table in another database

LWCARAB

Registered User.
Local time
Today, 20:02
Joined
Jan 29, 2008
Messages
38
I urgently need a way to clear a table in a different access database, this table is not and cannot be a linked table. Please help.

Regards,

Richard
 
Last edited:
Try this:
Code:
    Dim db As Database
    
    Set db = DBEngine.OpenDatabase("c:\targetDB.mdb")
    
    db.Execute "delete * from TableToClear"
    
    db.Close
    Set db = Nothing

HTH,
Chris
 
Brilliant! Thanks so much, you're a life saver.

Richard
 

Users who are viewing this thread

Back
Top Bottom