How to run code at Db Sartup.

A

Allen

I have a 0ffice 2000 db that I made with office xp Pro. I
have a DB that I split. I got a link to a website
www.mvps.org/access/tables/tbl0009.htm that I am using the
code to relink the table. Now It say to run the
fRefeshLinks function at db Startup. I put that code in to
a form that starts then the Db starts. that does not work
at DB startup, it works when the form starts, but only
when the backend is in the right place. My questions is.

Should I put that code as a Module, or leave it in the
form that I have startup?

How would I run that Function(fRefreshLinks) at Db Start
up, before I get the error that it could not find the db,
please check path?

And anything else that I might be leaving out.

Thanks, Allen
 
C

Cheryl Fischer

I have a 0ffice 2000 db that I made with office xp Pro. I
have a DB that I split. I got a link to a website
www.mvps.org/access/tables/tbl0009.htm that I am using the
code to relink the table. Now It say to run the
fRefeshLinks function at db Startup.

Are you referring to the third paragraph in the description for this code:
"Here's a function (fRefreshLinks) that could be run at db startup."? If
so, the sentence indicates that running at startup of your application is
your choice. The code can be run at any time.
I put that code in to
a form that starts then the Db starts. that does not work
at DB startup, it works when the form starts, but only
when the backend is in the right place.

There are two prompts to the user in the code. The second one asks "Do you
wish to specify a different path for the Access tables?". If you click the
'Yes' button you can scroll through the Windows file/open dialog and select
the current location of the database containing the tables.
 
T

Technical Writer

Allen,

The table references need to be relinked before any references are made to
them by the database. Ergo the form that does this function must be unbound
(ie. no items on it that reference the linked table data).

What I did was create a form whose only function is to start when the
database is started,via the Startup window, and do the following:

1) reset the links
2) close itself, then
3) open the user startup form.

Brian
 

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