Splitting a database and updating the FE via e-mail

  • Thread starter Thread starter Sierras
  • Start date Start date
Well I fixed one of the problems by adding a "'" in front of the line
causing the problem. So now I don't have a
db.TableDefs(i).RefreshLink line anymore. At least it's not crashing
now.

But now I always get the Startup browse window when I update the FE
and even put it in the same folder as the BE. It works fine after
that. So I'm thinking that the Reconnect function isn't working
properly.

Also I fixed the startup form not closing by adding a DoCmd.Close
acForm, "frmStartup" to the switchboard load event.

Any idea why the reconnect isn't reconnecting when the FE and BE are
in the same folder?
 
danick5000 said:
Thanks for helping. It's getting better.
When the BE is in the same folder, it works.
When the BE is in a sub folder, the startup form comes up and the
click to browse works, but then doesn't disappear after the user links
the tables.
But when the BE is in a completely different folder or over a network,
I get an error message that the BE database could not be found and the
VB window highlights this Reconnect Function code by PETER VUKOVIC in
yellow:

db.TableDefs(i).RefreshLink

Does this code need any tweaking or were you able to use it as is?I
didn't do the Macro:AutoExec. But I'm assuming that just calling the
Reconnect function on the Open Startup form event is the same.

Here's the complete code from the internet:


Function Reconnect()
'**************************************************************
'* START YOUR APPLICATION (MACRO: AUTOEXEC) WITH THIS FUNCTION
'* AND THIS PROGRAM WILL CHANGE THE CONNECTIONS AUTOMATICALLY
'* WHEN THE 'DATA.MDB' AND THE 'PRG.MDB'
'* ARE IN THE SAME DIRECTORY!!!
'* PROGRAMMING BY PETER VUKOVIC, Germany
'* (e-mail address removed)
'* ************************************************************
Dim db As Database, source As String, path As String
Try changing the one line on the Form_Open event to If Reconnect = False
then. If Reconnect cannot link the tables, it returns False. At that
point you need to browse to find the back end file.

Mike Gramelspacher
 

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

Back
Top