Dan Waters
dwaters at usinternet.com
Thu Jul 10 18:29:26 CDT 2008
Thanks Asger! Dan -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Asger Blond Sent: Thursday, July 10, 2008 6:01 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Delete Table in Another Database 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 -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com