Macro on initial startup

K

Krizhek

I am looking to make a macro or vba that will run only when the first person
will access the database. And not run after more than one user is logged
into the database.

As background I am looking to make a database that whenever it is initialy
open it will copy particualar tables from a central database. (I can't do
linked tables because the number of users will be well over 60 people, and
the database is heavly used.)
 
K

Ken Snell [MVP]

A macro named AutoExec will run each time the database file is opened.

What you're describing sounds like more than one person is using the exact
same database file. That can lead to corruption and other problems. Better
to split the database into a front end (forms, queries, reports, etc.) and a
back end (data tables). Then each user has his/her own copy of the front end
and all front ends are linked to the back end.
 
K

KARL DEWEY

Build a table with a date field and make it a key field.
Set a condition in your Autoexec to check the table to see it contains the
current date. If not then run your one-time macro and an append query to add
a record with current date.
 
K

Krizhek

Thanks For the information:

If there are any other ways to do this I would be appreciative as I am doing
some initial testing before starting to build the databases.
 

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