Change Back End Location

T

TimJ

I am looking for a way to update the location of a linked back end. I want
to my front end to go through a list of possible back end db names and check
if any exist. When one does, connect to it.

Is there a connect method I can use?

TIA,
TimJ
 
K

Klatuu

Is this an fe mdb linking to a be mdb? If so, there is not a connection
method. You would either have to use the Linked Table Manager or write code
to allow the user to select a back end, and once the back end is selected,
create the links programmatically.
 
K

Ken Snell [MVP]

See The ACCESS Web for code to do the relinking:
http://www.mvps.org/access/tables/tbl0009.htm

I do this via setting up a table in which is the path to the backend(s),
with an identifying number for each path. You can use the identifying number
to know which backend is the one you want for each time you do the relinking
(which you do via the code in a form module, and you run the code by
clicking a button on that form). The code reads the appropriate path from
the table using a DLookup function.
 
A

amiga1200

Ken
When I add the code from your website,i get an error
"Only comments may appear after End Sub, End function or End Property"
when I examine the code ther are a number of
'Global Const ahtOFN_'
entries after the entry
'Declare Function CommDlgExtendedError Lib "comdlg32.dll" () As Long'
that appear in red, signifying that there is a problem, it appears in the
'Call the standard Windows File Open/Save dialog box'
section, Please help
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top