Macro on initial startup

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.)
 
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.
 
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.
 
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.
 
Back
Top