Instead of Autoexec, can one startup with a module?

  • Thread starter Thread starter Harris
  • Start date Start date
H

Harris

Security messages popup if one tries to open a database that has a
macro, and Security level has been set to "high".

I have only one macro - autoexec - which runs code in a module to check
links "checklinks()". Is it possible to have the database automatically
run this part of the module instead of having it called from the
autoexec macro? In other words, if I can run the module at startup
instead of calling it from autoexec, I can remove the macro and users
will not have the initial security alerts that popup when one opens the
database.

Any thoughts and help will be greatly appreciated.

Harris
 
you could open a "splash" form, and run the code from it's Open, Load, or
Current event, then open your normal "switchboard" or "main menu" form if
everything checks out. if the first form that currently opens in your
database is unbound, you could run the code from it, and forego the splash
form.

hth
 
Thanks, this works brilliantly except that I was under the impression
that it was macros that bring up security warnings, e.g., "Opening
"c:\\test.mdb" "This file may not be safe if it contains code that was
intended to harm your computer. Do you want to opent this ......"

However, this workaround does not cancel this message - seems like
there is no option but to set the macro security level to low - even if
there are no macros.

Regards,
Harris
 
The security dialog is an Office-wide one, and in other Office applications
like Word and Excel there isn't the same distinction between macros and VBA.
Hence the term 'macro security'. It is a bit misleading in Access, though,
as you have discovered.
 
You can aparently prevent the security question by "digitally signing" the
distribution.
you need to get a digital signature from a trusted authority. Look up
digital signature in the msdn library. or in the programming help.
 
Back
Top