Help On running code on db startup

  • Thread starter Thread starter Allen
  • Start date Start date
A

Allen

I have a 2000 Access Split Db.I was using some code that
some one had refered to me on this site.
http://www.mvps.org/access/tables/tbl0009.htm for
relinking tables, Now I the the code in a form that starts
when the Db opens and ran the function(fRefreshLinks) on
Load. but it only works if the backend is in the original
location. If I move the backend, I get an error that I
cant find the backend. My Questions is:

Do I need to put that code as a module or leave it on the
form that starts up?

How would I run the function(fRefreshLinks) at Db Start Up
before I get that error, that it can not find the backend.

Thanks, Allen
 
Allen said:
I have a 2000 Access Split Db.I was using some code that
some one had refered to me on this site.
http://www.mvps.org/access/tables/tbl0009.htm for
relinking tables, Now I the the code in a form that starts
when the Db opens and ran the function(fRefreshLinks) on
Load. but it only works if the backend is in the original
location. If I move the backend, I get an error that I
cant find the backend. My Questions is:

Do I need to put that code as a module or leave it on the
form that starts up?

How would I run the function(fRefreshLinks) at Db Start Up
before I get that error, that it can not find the backend.

Thanks, Allen

You can leave it in the form. Put the code in the Geberal Declarations
section and call the functions from the Form Open event. Also, do any
other initial processing you need done at that time before you allow the
user to do anything.

This form should only run once and should be called by Access from the
startup option.

Tools/Startup
Under "Display Form" enter the name of the form you want to started.

As I remember this routine, if it can't find the backend database, it will
ask the user "Do you wish to specify a different path for the Access Tables?".
If the user answers Yes, the routine opens an Open Dialog box allowing the
user to navagate to the directory and select the DB.

You may want to check the code to see that you have copied all of it correctly.

Ron
 
Back
Top