Alex, I like your solution too. I had tried to write a macro to execute a
function but the function wasn't listed. Then I found that I had originally
declared it as Private not Public. Also I wasn't sure what the name of the
macro had to be. All is well now. Thanks guys for your expert help!
"Alex Dybenko" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> then try to use autoexec macro, first run your code there, then open
> switchboard
>
> --
> Alex Dybenko (MVP)
> http://Alex.Dybenko.com
> http://www.PointLtd.com
>
>
> "Peter Marshall" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> > Thanks, Wayne. Calling my module from the Open event of my main
> switchboard
> > works fine. I was just concerned that the module would execute
everytime
> > the main menu appears, but it is really only opened when the app loads
(it
> > is minimized during other times).
> >
> >
> > "Wayne Morgan" <(E-Mail Removed)> wrote in
> message
> > news:(E-Mail Removed)...
> > > I just tested and the startup form's Open event fires before the
> Autoexec
> > > macro, if you have one. So, the form appears to be the first thing to
> run.
> > > If you want it to run before the switchboard, you may be able to open
> > > another form, place code in it, and open the switchboard from that
form.
> > > However, if you are trying to run something that will allow you to
> cancel
> > > the opening of the switchboard, you may be able to do it in the
> > > switchboard's Open event and use the Cancel ability built-in there. I
> > tried
> > > setting Cancel = True in my startup form's Open event, the form never
> > showed
> > > on the screen and I received no errors.
> > >
> > > --
> > > Wayne Morgan
> > > MS Access MVP
> > >
> > >
> > > "Peter Marshall" <(E-Mail Removed)> wrote in
> message
> > > news:(E-Mail Removed)...
> > > > How do I get a vba module to execute as soon as my Access 2002
> > application
> > > > is loaded (even before the Switchboard loads)?
> > > >
> > > >
> > >
> > >
> >
> >
>
>