Copy Table Data 2 another Table

Xenix

Registered User.
Local time
Today, 21:27
Joined
Oct 8, 2001
Messages
124
I have imported data to a new table now I want to export all the records to another table with different field names.

How can I do this in code without having to design a form that will copy all records over using a query?


Thank you very much

Mike
 
Thank you Col,

now I need to delete all the data in a table but not the whole table.

'DoCmd.DeleteObject acTable, "StockImport"

How can I do that?


Thank you in advance

Mike
 
How about a delete query.
You can delete the records but not the structure, is that what you mean?
Col
:cool:
 
Haha thank you Col yes that works fine :)

but now I seem to have a problem with the import code :(

DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel7, _
"StockImport", "g:\Database\part number details.xls", True

worked the first time but now I get an error :(

The file 'g:\Database\part number details.xls' doesn't contain any data.

any ideas?

Thank you

Mike
 
Hmmmm not sure

Presumably the file does contain data. If so, I would redo the import specification. I'm not too well up on importing xls. I always did txt files.

Thats about all I can think of for a moment.

Col
:cool:
 

Users who are viewing this thread

Back
Top Bottom