Macro to relink db to be file?

  • Thread starter Thread starter Grace
  • Start date Start date
G

Grace

Hello, can I use a Macro to perform a database "relink"?
I would like to have a button that runs a macro that will
relink all the tables to a back end file set in a folder
on local server. Can a macro handle this or do I need VB?

Thank you,
Grace
 
I added this code to a button. I am getting a runtime
error when it prompts to specify a different path for the
Access Tables. The compile error says that the sub or
function is not defined and brings me to this line:

Function fGetMDBName(strIn As String) As StringFunction
fGetMDBName(strIn As String) As String

Is this supposed to bring up a dialog box to locate the be
file?

Thanks again,
Grace
 
I added this code to a button. I am getting a runtime
error when it prompts to specify a different path for the
Access Tables. The compile error says that the sub or
function is not defined and brings me to this line:

Function fGetMDBName(strIn As String) As StringFunction
fGetMDBName(strIn As String) As String

Is this supposed to bring up a dialog box to locate the be
file?

You need to include the "GetOpenFileName" code (this is stated on the page from
which you retrieved your other code). It is available at:

http://www.mvps.org/access/api/api0001.htm
 
Back
Top