How to Run Code upon database open???

StrumBudDo

New member
Local time
Today, 11:18
Joined
Jan 22, 2003
Messages
7
Does anyone know how to get code to run upon opening an Access database. I am about to start selling an Access MDE database I made, and I have some Enter Serial # and Registration # screens which come up when the database is first installed. However, I realized today that the user could just go to Tools - Startup and change the form that opens on startup.

I researched this in the access help, and found a way to run a macro when the database opens by naming the Macro AutoExec. In my macro, I specify code that changes the Startup form back to what it should be, but there is a loophole - the user can hold the Shift key in and the AutoExec macro will not run.


Are there any other ways to run code when a database opens? Is there an Open event for the database?


Any help would be greatly appreciated,


Scott
 
You can create a macro (or code I think) called autoexec. This will run regardless of which form is open.

Also you should design your own tool bars etc to beef up your security.

Try downloading the DB from my site get a few ideas on what to do.

http://users.impulse.net.au/predator/assetsontrack.htm

I have the shift key disabled, Menus locked, F11 disabled, code password protected as well as a custom help file (Press F1 any time)

If you password protect your code then none of your forms can be exported.

Email me if you want further help to unlock etc.

Dave

predator@impulse.net.au
 

Users who are viewing this thread

Back
Top Bottom