Hello all,
I have a single user db in MS Access - split – front end and back end both 2007 accdb - installation using the Access packaging runtime, back end (and the subfolder where it "sits") added as a "extra" file during packaging, as per Microsoft instructions.
I will be sending this to different users and they will choose an installation location, the front end will be located in a (main) folder in that location, the back end in a subfolder inside that main folder.
I did a lot of "surfing", found a bunch of different solutions, many of them DAO (which I would prefer not to use, as everything else is ADO) and others that still do not work for one reason or another.
Anyway, to me it seems that all should come down to traversing the tables inside the CurrentDb and identifying the linked tables, for which CurrentDB.TableDefs(“current table number”).Connect has the current link info. After that, it should be just a matter of assigning the new path to .Connect and use .RefreshLink to update the info.
Alas that does not work. I do not receive an error message; however, the link (.Connect info) is not updated. I tried using variables instead of directly using the CurrendDB, but that did not work either.
Am I going completely wrong about this? Do I have to delete / recreate the linked tables? Or…
Do any of you have a good code for this? In principle, I am looking for the down and dirty code, to address just the update of the links, as this is a limited number of users and I can control many of the variables in regards to the installation. Naturally, if what you have is the catch all code (the one that checks if the DB and tables exist, tests the different types of tables, offers the File Lookup window if the provided link is not correct, etc.), I will not complain.
Any help is always apreciated!
Thx,
4N6MSTR
______________________________________________
If you don't know where you are going
It does not matter how fast you are
You will never get there
I have a single user db in MS Access - split – front end and back end both 2007 accdb - installation using the Access packaging runtime, back end (and the subfolder where it "sits") added as a "extra" file during packaging, as per Microsoft instructions.
I will be sending this to different users and they will choose an installation location, the front end will be located in a (main) folder in that location, the back end in a subfolder inside that main folder.
I did a lot of "surfing", found a bunch of different solutions, many of them DAO (which I would prefer not to use, as everything else is ADO) and others that still do not work for one reason or another.
Anyway, to me it seems that all should come down to traversing the tables inside the CurrentDb and identifying the linked tables, for which CurrentDB.TableDefs(“current table number”).Connect has the current link info. After that, it should be just a matter of assigning the new path to .Connect and use .RefreshLink to update the info.
Alas that does not work. I do not receive an error message; however, the link (.Connect info) is not updated. I tried using variables instead of directly using the CurrendDB, but that did not work either.
Am I going completely wrong about this? Do I have to delete / recreate the linked tables? Or…
Do any of you have a good code for this? In principle, I am looking for the down and dirty code, to address just the update of the links, as this is a limited number of users and I can control many of the variables in regards to the installation. Naturally, if what you have is the catch all code (the one that checks if the DB and tables exist, tests the different types of tables, offers the File Lookup window if the provided link is not correct, etc.), I will not complain.
Any help is always apreciated!
Thx,
4N6MSTR
______________________________________________
If you don't know where you are going
It does not matter how fast you are
You will never get there