I have frontend .accdb and a backend .mdb. I want to add a new "Vehicle" and create an "orders" table in the backend, then link to the new table into the frontend. I use this code
The CopyObject works and a new table is created in the back end but the Transferdatabase line fails:Code:wOrderVehicle = "tblOrdersGC33" DoCmd.CopyObject "N:\Database2012\MyBE.mdb", wOrderVehicle, acTable, "tblOrders" DoCmd.TransferDatabase acLink, "Microsoft Access", "N:\Database2012\MyBE.mdb", acTable, wOrderVehicle, wOrderVehicle, True
I have tried separating the two lines with a 2 second timer and tried to default the penultimate parameter as it seems superfluous, but always the same result