I have a need to let users create new tables that will contain given rows that are input to report processing. The user enters a name for identifying the instance of the report and the name of the table that is to contain the rows for the report. The report is part of an existing Microsoft Access suite of databases. The Itineraries table is input to the report process prior to the enhancement described herein.
My initial try failed.
The DoCmd method is being run in a front-end database with the notion of creating a new table structure in the back-end that would then be populated appropriately. The Itineraries table is located in the back-end database and is linked in the front-end. The result of the command was unexpected.
DoCmd.TransferDatabase acExport, _
“Microsoft Access”, “Path to backend database”, _
acTable, “Itineraries”, “TestTable”, True
I expected to have a table named TestBills in the backend database that I could link to from the front end database. This did not happen. The entire Itineraries table was copied into the backend database, sort of under the name TestBills. I say, “sort of”, because the TestBills table was a link in the backend database to the backend database itself! I could not link to this table from the frontend database.