Set Table Location

  • Thread starter Thread starter DW
  • Start date Start date
D

DW

No one posted an answer to an earlier request, so I will try again

I am going to make a batch file to check and update the FE as needed.
My problem will be that when my application (that I made) opens for the
first time, it will prompt the user to find the location manually.
Unfortunately there are a few indidviduals here that are not very iliterate
on a pc. I am wanting to take that issue away by setting in code the
location of each table/database. What I am using for relinking will only
work after specifing the location at the very first instance upon opening,
then from that point it will relink on its own.
We use a peer to peer platform to share the BE and I always use the same
directory for both db's(Drive "H" for the first one, and Drive "I" for the
second), they are mapped drives.
Is there a way to set the path?
I remember seeing something about unicode I believe to do this a long time
ago but I dont remember where I saw it.
I would like to use that in conjuction with my other code that I use to
relink with. I just need help with specifing the location, the rest I can
fiqure out.

Any ideals would be appreciated.
DW
 
DW,

If your BE data file is always in the same location, I don't understand
why you can't just "hard-code" this path into your re-linking code.

Another way I have done this, in the case where the path to the backend
will be different from one user to another, is to store the BE path in
an .ini file in the same folder as the FE, and have the re-linking code
retrieve the BE path from there.
 
DW,

Well, I don't know specifically how you are relinking the tables. But I
would presume there is VBA code there, and somewhere in the code, there
must be a variable or statement where the location of the backend
database is referenced. So, whatever it is, put in the actual path/file
name of your backend.

There is sample code for re-linking here...
http://www.mvps.org/access/tables/tbl0009.htm
.... and in this code there could be provision for a default location to
be entered.
 
how would you code the location?

Steve Schapel said:
DW,

Well, I don't know specifically how you are relinking the tables. But I
would presume there is VBA code there, and somewhere in the code, there
must be a variable or statement where the location of the backend database
is referenced. So, whatever it is, put in the actual path/file name of
your backend.

There is sample code for re-linking here...
http://www.mvps.org/access/tables/tbl0009.htm
... and in this code there could be provision for a default location to be
entered.
 
DW,

I don't understand? Just the path and file name of the backend mdb
file. You said you had code to relink the backend. You said your code
prompts the user for the location of the backend. I assume the user's
response to the prompt is help in a string variable in your code, right?
So, in the place of that string variable, put the path (I think you
said it was H: drive somewhere?), and use it in exactly the same way
that your code currently uses the path entered by the user.

How are you doing the relinking?
 
Steve,
have you ever had one of those things that is suppossed to be simple, but
you make it harder than what it was?
So, in the place of that string variable, put the path

for some reason this didnt click till now?

Thanks for shaking my head

DW
 
Back
Top