A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Re-Link backend with ini file



 
 
Thread Tools Display Modes
  #1  
Old March 4th, 2010, 09:24 PM posted to microsoft.public.access.forms
Nick Del Vecchio
external usenet poster
 
Posts: 19
Default 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  
Old March 5th, 2010, 06:42 PM posted to microsoft.public.access.forms
ruralguy via AccessMonster.com
external usenet poster
 
Posts: 1,172
Default 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  
Old March 5th, 2010, 06:45 PM posted to microsoft.public.access.forms
ruralguy via AccessMonster.com
external usenet poster
 
Posts: 1,172
Default 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  
Old March 5th, 2010, 09:45 PM posted to microsoft.public.access.forms
Jeanette Cunningham
external usenet poster
 
Posts: 2,190
Default 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  
Old March 5th, 2010, 11:22 PM posted to microsoft.public.access.forms
ruralguy via AccessMonster.com
external usenet poster
 
Posts: 1,172
Default 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  
Old March 5th, 2010, 11:51 PM posted to microsoft.public.access.forms
Jeanette Cunningham
external usenet poster
 
Posts: 2,190
Default 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  
Old March 6th, 2010, 12:33 AM posted to microsoft.public.access.forms
Nick Del Vecchio
external usenet poster
 
Posts: 19
Default 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  
Old March 6th, 2010, 12:48 AM posted to microsoft.public.access.forms
Jeanette Cunningham
external usenet poster
 
Posts: 2,190
Default 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  
Old March 6th, 2010, 12:52 AM posted to microsoft.public.access.forms
Jeanette Cunningham
external usenet poster
 
Posts: 2,190
Default 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  
Old March 6th, 2010, 05:22 AM posted to microsoft.public.access.forms
Nick Del Vecchio
external usenet poster
 
Posts: 19
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:47 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.