Hi,
Does anyone know of a way I can write a script that imports a table
from a particular .mde file? I don't seen any obvious way to do it as a
macro. Any suggestions if it can be done as a macro or as a written
module?
My ultimate goal is to have script that clears info out of 1 table in
an .mdb file, imports an identically structured table from a .mde file,
runs an append query I have in place to copy the data from the imported
table to the table in my.mbd file, and then delete the imported table.
Any help that could be provided would be greatly appreciated.
Best wishes,
George Hadley
ghadley_00@yahoo.com
Lyle Fairfield - 17 Feb 2006 16:41 GMT
With DBEngine(0)(0)
.Execute "DELETE * FROM Suppliers WHERE SupplierID IN (SELECT
SupplierID FROM Northwind.mde.Suppliers)"
.Execute "INSERT INTO Suppliers SELECT * FROM
Northwind.mde.Suppliers"
End With
ghadley_00@yahoo.com - 17 Feb 2006 18:02 GMT
Is this code I would run as a module?
Lyle Fairfield - 17 Feb 2006 18:08 GMT
Yes
or you could use the strings in two separate saved queries.