I have a access (2000 format) database. I want to be able to export all the tables in it onto a single .xls file and import it from an identical .xls file (for example if i email the tables ONLY to another person who has the same Db structure, he should be able to cleanly import the tables and see the data on his DB). I can currently do 2 things.
1- export all tables into one .xls file using
Expand|Select|Wrap|Line Numbers
- strFullPath = "D:\Database\ALL_DATA.xls"
- DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel7, "tbl_1", strFullPath, False
- DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel7, "tbl_2", strFullPath, False
- DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel7, "tbl_3", strFullPath, False
2- I can use a macro to export/import. I can do this export/import on individual tables (into individual expective .xls files) perfectly, but once i try to import more than one table from the .xls file it gives a problem. It messes up the tables' format. Meaning it expects tbl_2 to have the same tructure as tbl_1.
What can be wrong here? And how can i fix it... I would prefer to use a fixed version solution 1 as it feels more contrete to me (personal opinion).
Thanks guys!