Forum Discussion
Linking a frontend to a backend
- Mar 15, 2023
arnel_gpThanks for your response, arnel. Your advice worked on my testset. Now I will work on the FE with some 20 linked tables.
make a copy of your FE.
on the Copy (FE), remove all linked table and try to Create new link.
arnel_gpThanks for your response, arnel. Your advice worked on my testset. Now I will work on the FE with some 20 linked tables.
- George_HepworthMar 15, 2023Silver ContributorKeep in mind that the "linked tables" you see in the Navigation Pane are not the actual tables. They are the names for the connections set up to those actual tables in the back end accdb.
Therefore, the names you see there are aliases for the real tables. You can rename them at will in the Navigation Pane and not have any effect on the names of those real tables where they reside in the back end accdb.
In this case, there was an existing linked table alias, e.g. "tblProduct" or something. When you added a second link to the same back end table, Access used the same alias, but appended the suffix "1", indicating it is a second copy of something with the same name. Both aliases, though, link to the same table in the back end accdb.- VicInUtrechtMar 15, 2023Copper Contributor
George_HepworthThanks for your reaction, George! It gives me the chance to further discuss it: I do not understand the merit of the additional tables added with the number attached in stead of replacing the original BE's path and name with the new one, as it was done in earlier versions of Access. Does anybody know Microsoft's idea about how this additional table could be used?
Also, it would be a good help when the expalantions of the linked table manager would include Arnel's solution when you want to relink to an other BE.
- George_HepworthMar 15, 2023Silver Contributor
It's always been this way. If you add a link to a table with the same name as an existing name, Access adds it as a second table with the incrementing suffix.
I can't imagine the chaos that would result from replacing a link to one table with a link using the same name when adding a new table. Let's say, for example, you have two copies of a back end. One is for development and you are the only one who links to it for maintaining and adding new functions. The other is an accdb with the same set of tables, but it is used for production. You have the same named tables in both development and production, to minimize work required to manage both.
Now, one fine day you decide its time to replace the links from development to production for final testing and deploying. All goes well and you deploy the accdb with the links to production for use by your users.
Then you move on to the next development task, but instead of replacing production links to ALL tables, you miss one and leave it linked to the real, active production table, while relinking all of the other tables in the development back end. Your plan is in place, the names stay the same. so you have no warning that this happened.
Away you go, makes changes and adding and deleting data in what you think is the development back end. All except that one table, which is still linked to production.
And you start getting phone calls from users wondering what in the world happened to their data? You just overwrote production data with test data in development.
I can think of several other disastrous scenarios that could happen if Access did not maintain that practice of adding new links every time it encounters an alias of the same name.
No, you do NOT want to simply link to the same name and have Access silently replace the linked tables with the same name. You want that warning which tells you there are two different links to tables with the same name. That could be the same table in the same accdb, true. But it could be two different tables in two different accdbs which just happen to have the same name.