If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Re-Link backend with ini file
OK I've been playing around with this for a couple of days now and
have found a few suggestions as to how to do it. But I still can't get it to work. Basically, I have a Frontend called FEApp.mde and a file called DataPath.ini in one folder and a Backend called BEdata.mdb on another shared computer. The DataPath.ini file and has only one line in it. \\PC1234\SharedDocs\BEdata.mdb On another forum, someone posted a suggestion to have this code in the Front End Dim strFile As String Dim intFile As Integer strFile = App.Path & "\DataPath.ini" intFile = FreeFile() Open strFile For Input As intFile Line Input #intFile, gblDataPath Close intFile MsgBox gblDataPath However, there is no mention as to where to put it or how to call it. Does anyone know how to get this to work so that when I launch the front end, it looks as the ini file for the path to the backend and refreshes the links to the tables in that backend? |
#2
|
|||
|
|||
Re-Link backend with ini file
I find the best startup is to load an invisible form with the AutoExec macro
and use the OnLoad event of the invisible form to accomplish this task. Nick Del Vecchio wrote: OK I've been playing around with this for a couple of days now and have found a few suggestions as to how to do it. But I still can't get it to work. Basically, I have a Frontend called FEApp.mde and a file called DataPath.ini in one folder and a Backend called BEdata.mdb on another shared computer. The DataPath.ini file and has only one line in it. \\PC1234\SharedDocs\BEdata.mdb On another forum, someone posted a suggestion to have this code in the Front End Dim strFile As String Dim intFile As Integer strFile = App.Path & "\DataPath.ini" intFile = FreeFile() Open strFile For Input As intFile Line Input #intFile, gblDataPath Close intFile MsgBox gblDataPath However, there is no mention as to where to put it or how to call it. Does anyone know how to get this to work so that when I launch the front end, it looks as the ini file for the path to the backend and refreshes the links to the tables in that backend? -- RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro Please post back to this forum so all may benefit. Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/201003/1 |
#3
|
|||
|
|||
Re-Link backend with ini file
You will probably want to incorporate code similar to this in your
application. http://allenbrowne.com/ser-13.html Nick Del Vecchio wrote: OK I've been playing around with this for a couple of days now and have found a few suggestions as to how to do it. But I still can't get it to work. Basically, I have a Frontend called FEApp.mde and a file called DataPath.ini in one folder and a Backend called BEdata.mdb on another shared computer. The DataPath.ini file and has only one line in it. \\PC1234\SharedDocs\BEdata.mdb On another forum, someone posted a suggestion to have this code in the Front End Dim strFile As String Dim intFile As Integer strFile = App.Path & "\DataPath.ini" intFile = FreeFile() Open strFile For Input As intFile Line Input #intFile, gblDataPath Close intFile MsgBox gblDataPath However, there is no mention as to where to put it or how to call it. Does anyone know how to get this to work so that when I launch the front end, it looks as the ini file for the path to the backend and refreshes the links to the tables in that backend? -- RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro Please post back to this forum so all may benefit. Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/201003/1 |
#4
|
|||
|
|||
Re-Link backend with ini file
In addition to ruralguy's excellent answer, my experience with this approach
recently is that changing the path and refreshing the links takes 5 minutes when the backend is on the server at my clients office. If I manually delete all the linked tables from the frontend, then do a link/import manually, the process runs almost instantly. Then I copy this frontend to all the other users' computers. Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia "ruralguy via AccessMonster.com" u12102@uwe wrote in message news:a490e3e3624d6@uwe... You will probably want to incorporate code similar to this in your application. http://allenbrowne.com/ser-13.html Nick Del Vecchio wrote: OK I've been playing around with this for a couple of days now and have found a few suggestions as to how to do it. But I still can't get it to work. Basically, I have a Frontend called FEApp.mde and a file called DataPath.ini in one folder and a Backend called BEdata.mdb on another shared computer. The DataPath.ini file and has only one line in it. \\PC1234\SharedDocs\BEdata.mdb On another forum, someone posted a suggestion to have this code in the Front End Dim strFile As String Dim intFile As Integer strFile = App.Path & "\DataPath.ini" intFile = FreeFile() Open strFile For Input As intFile Line Input #intFile, gblDataPath Close intFile MsgBox gblDataPath However, there is no mention as to where to put it or how to call it. Does anyone know how to get this to work so that when I launch the front end, it looks as the ini file for the path to the backend and refreshes the links to the tables in that backend? -- RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro Please post back to this forum so all may benefit. Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/201003/1 |
#5
|
|||
|
|||
Re-Link backend with ini file
Wow Jeanette, 5 minutes? I suspect something else is going on there.
Jeanette Cunningham wrote: In addition to ruralguy's excellent answer, my experience with this approach recently is that changing the path and refreshing the links takes 5 minutes when the backend is on the server at my clients office. If I manually delete all the linked tables from the frontend, then do a link/import manually, the process runs almost instantly. Then I copy this frontend to all the other users' computers. Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia You will probably want to incorporate code similar to this in your application. [quoted text clipped - 31 lines] front end, it looks as the ini file for the path to the backend and refreshes the links to the tables in that backend? -- RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro Please post back to this forum so all may benefit. Message posted via http://www.accessmonster.com |
#6
|
|||
|
|||
Re-Link backend with ini file
Yes, it takes this long every time I try it this way.
Client needs to spend $$ to improve network setup, but is putting it off at present. Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia "ruralguy via AccessMonster.com" u12102@uwe wrote in message news:a4934f31ccd19@uwe... Wow Jeanette, 5 minutes? I suspect something else is going on there. Jeanette Cunningham wrote: In addition to ruralguy's excellent answer, my experience with this approach recently is that changing the path and refreshing the links takes 5 minutes when the backend is on the server at my clients office. If I manually delete all the linked tables from the frontend, then do a link/import manually, the process runs almost instantly. Then I copy this frontend to all the other users' computers. Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia You will probably want to incorporate code similar to this in your application. [quoted text clipped - 31 lines] front end, it looks as the ini file for the path to the backend and refreshes the links to the tables in that backend? -- RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro Please post back to this forum so all may benefit. Message posted via http://www.accessmonster.com |
#7
|
|||
|
|||
Re-Link backend with ini file
Thanks for the input, but none of these suggestions focus on the
solution that I requested in this thread. My problem is I don't know how to get the front end to get the path referenced in the .ini file and then refresh the links to the table to the backend. |
#8
|
|||
|
|||
Re-Link backend with ini file
See the code in this link
If your backend and frontend are in different folders, see Dev Ashish's solution: Relink Access tables from code Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia "Nick Del Vecchio" wrote in message ... Thanks for the input, but none of these suggestions focus on the solution that I requested in this thread. My problem is I don't know how to get the front end to get the path referenced in the .ini file and then refresh the links to the table to the backend. |
#9
|
|||
|
|||
Re-Link backend with ini file
Here's the link
http://www.mvps.org/access/tables/tbl0009.htm Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia "Jeanette Cunningham" wrote in message ... See the code in this link If your backend and frontend are in different folders, see Dev Ashish's solution: Relink Access tables from code Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia "Nick Del Vecchio" wrote in message ... Thanks for the input, but none of these suggestions focus on the solution that I requested in this thread. My problem is I don't know how to get the front end to get the path referenced in the .ini file and then refresh the links to the table to the backend. |
#10
|
|||
|
|||
Re-Link backend with ini file
I've used this link many times in the past and it works very well but
it is not what I am asking for in this thread. Neither this link or Dev Ashish's solution show how to get the front end to accept the path from an ini file. Here is a link to a thread with Douglas Steele and a discussion as to what I am trying to do. http://www.utteraccess.com/forum/Unc...-t1938957.html In this thread, Mr. Steele writes, "My preference would probably be use an INI file, located in the same folder as the front-end. Then, you can simply mail a new INI file to the users and have them replace the one they have." This is what I would like to do as well, but have not figured out how to do it. On Mar 5, 7:52*pm, "Jeanette Cunningham" wrote: Here's the linkhttp://www.mvps.org/access/tables/tbl0009.htm Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia |
|
Thread Tools | |
Display Modes | |
|
|