[AccessD] Delete Table in Another Database

Asger Blond ab-mi at post3.tele.dk
Thu Jul 10 18:01:21 CDT 2008


Dan,

This works for me:

Dim cnn As New ADODB.Connection
Dim TempTablesPath As String
TempTablesPath = "C:\MyDir\MyDB.mdb"
cnn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
TempTablePath
cnn.Open
cnn.Execute "DROP TABLE tblTemp"
cnn.Close
Set cnn = Nothing

HTH
Asger

-----Oprindelig meddelelse-----
Fra: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] På vegne af Dan Waters
Sendt: 10. juli 2008 23:10
Til: 'Access Developers discussion and problem solving'
Emne: [AccessD] Delete Table in Another Database

I'm trying to first delete and then recreate a table in another database,
but the DeleteObject command can't find the table.

This is not working:
    DoCmd.DeleteObject acTable, "tblTemp IN '" & TempTablesPath & "'"

What will work?

Thanks!
Dan


-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com












































































































































































More information about the AccessD mailing list