Murray Brown
asked on
Access VBA move table and create link
In Accces I have a split database solution with forms in my front-end database and tables in the other. Is it possible to use VBA to copy a new table created in the front-end to the backend then delete it and link to the copied backend table. so I am effectively moving it from the one database to the other then creating a link to it
ASKER
Thanks John. Would you be able to elaborate. I get the linking part but what about the moving part? Thanks
Use the acImport option with the TransfertDatabase function to import (create copies) your tables.
Unless new table are created or table names are updated, links in the front-end can remain untouched.
Unless new table are created or table names are updated, links in the front-end can remain untouched.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Personally, I'm not sure I see the use case for this. Wouldn't it just be easier to use the External Data feature to copy from the FE into the BE, and then use it again in the FE to link the table from the BE?
ASKER
Hi Dale
I see your point but I am working with highly incapable people that won't follow instructions. My previous approach was to use a third database where they simply had to import the new table into the backend. They got that wrong so I automated the process, which required pasting the front end and third database with their new tables into a folder, which was still a tall ask
I see your point but I am working with highly incapable people that won't follow instructions. My previous approach was to use a third database where they simply had to import the new table into the backend. They got that wrong so I automated the process, which required pasting the front end and third database with their new tables into a folder, which was still a tall ask
Totally understand, Murray. You have to love users!
Dale
Dale
ASKER
You do Dale. And this is their so called "head of IT"
Check the article from MS : https://docs.microsoft.com/en-us/office/vba/api/access.docmd.transferdatabase