how does one run VBA code at startup in access97? is it as simply as
naming a module autoexec or something like that? thanks!
Christine Scheu wrote in message <696e67$dqh$1...@interport.net>...
You can do it with an AutoExec macro (not a module) or by putting the code
in the OnLoad event of the startup form. You set a startup form using the
Startup command of the Tools menu.
HTH
Brendan Reynolds
bre...@ireland.zarcrom.com
Zarcrom Web Hosting Services
http://ireland.zarcrom.com
Andy
On 9 Jan 1998 19:08:39 -0500, c-s...@interport.net (Christine Scheu)
wrote:
Andrew Semeiks <sem...@albany.net> wrote in article
<34b76626...@news.albany.net>...
I find the advantages to be:
You can trap all errors in the code module
vs- using a macro
Code does not stop the display of the form
if run in the timer event.
--
http://www.citynet.net/personal/psic
JCI Inc.
2425 Poca River Road South
Poca, WV 25159 voice (304) 776-3675
~~ Just because you do not know the answer, does not mean that someone
else does ~~
> how does one run VBA code at startup in
> access97? is it as simply as naming a
> module autoexec or something like that?
Even simpler: put the code in the Open event of the
first form you want the user to see; then, on the menu,
Tools | Startup and enter the name of the startup
form; or, just as before, you can name a macro
AutoExec and include a RunCode action to run
the code you want executed first.
Pete B wrote:
>
> Beg to differ. The best way is to use the autoexec to run the code
> directly and let the code open the startup form, as well as do everything
> else that needs doing at startup. That is the ONLY thing you should really
> ever put in an autoexec macro, the one command to run your startup code
> function.
> --
> Pete B
>
> Andrew Semeiks <sem...@albany.net> wrote in article
> <34b76626...@news.albany.net>...
> > Best way is to use an autoexec macro to open a main switchboard form.
> > On this form build command buttons that start VBA code to accomplish
> > your tasks.
> >
> > Andy
> >
> > On 9 Jan 1998 19:08:39 -0500, c-s...@interport.net (Christine Scheu)
> > wrote:
> >
> > >
> > >how does one run VBA code at startup in access97? is it as simply as
> > >naming a module autoexec or something like that? thanks!
Works like a charm, if the startup fails, the macro just closes the
application with no macro error display. I confess this is not my design,
I saw it somewhere as a tip and have used it successfully ever since.
As for Autokeys, I too wish there were a way to do that via code, no
workaround I know of, but I have not had any real problems with it either.
--
Pete B
John L. Turner <Turn...@Citynet.net> wrote in article
<34B7CB35...@Citynet.net>...
> Hello Pete!
> I believe that is a hold over from the Access 2/ 95 days
> The problem with that is if you ever end up with a run time version
> and the macro fails, then the user is looking at the screen saver.
> We try to elimate all macros, the only one that I can not work around
> having is the Global key assignments. Any Ideas there.
> Regards John T
>
> Pete B wrote:
> >
> > Beg to differ. The best way is to use the autoexec to run the code
> > directly and let the code open the startup form, as well as do
everything
> > else that needs doing at startup. That is the ONLY thing you should
really
> > ever put in an autoexec macro, the one command to run your startup code
> > function.
> > --
> > Pete B
> >
Actually, you need to create a MACRO called autoexec that executes the desired
module or form.
Bob Breece
Accu-Data Computer Services - Software Consulting
http://www.accu-dataindy.com