My database uses a query based on several tables, and I've just added a feature that exports an excel spreadsheet of the query a) to back up the information, and b) so that the XLS file can be distributed to enable other users to update their copy of the database.
The problem is getting the code right for importing. So far I've got the following but it'll only import to a table which isn't much good as I've got several tables and the query contains information from all of them.
DoCmd.TransferSpreadsheet acImport, Excel97, "Test", [BackupPath] & "\backup.xls", True
Is it possible to get Excel to import directly to a query, or is there some other way around my problem that would be easier?
The problem is getting the code right for importing. So far I've got the following but it'll only import to a table which isn't much good as I've got several tables and the query contains information from all of them.
DoCmd.TransferSpreadsheet acImport, Excel97, "Test", [BackupPath] & "\backup.xls", True
Is it possible to get Excel to import directly to a query, or is there some other way around my problem that would be easier?