I need to call a procedure from a database (DB1) to import data to another database (DB2). I already have the simple code that imports an Excel file into into the dabase where the procedure is called from; but I need the data to be imported into the other database (DB2). Is there a way that I can indicate to delete and import the table in the other database? I am using MS Access 2002-20003 format. Please help! Any ideas are greatly appreciated.
Public Function Import_CustomerParent()
IF Not IsNull(DLookup("ID", MSysObjects", _
"Type = 1 AND Name = 'Temp_CustomerParent'")) Then
DoCmd.DeleteObject acTable, "Temp_CustomerParent"
End If
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel8, "Temp_CustomerParent", "C:\Customers.xls", True
Kind regards,
Mayra