By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,793 Members | 1,257 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,793 IT Pros & Developers. It's quick & easy.

AutoExec macro, A97?

P: n/a
MLH
Did A97, perchance, do away with the need for
an AutoExec macro to initiate an autoexec sequence
for databases? Or, must we still suffer with that hideous
macro?
Nov 13 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
MLH wrote:
Did A97, perchance, do away with the need for
an AutoExec macro to initiate an autoexec sequence
for databases? Or, must we still suffer with that hideous
macro?


I use an opening form and the on open event of that form. If I just
want the procedures to do stuff but don't want that particular form up,
after all the procedures run by the on open event are done, I plop in
Cancel = True.

This does pretty much the same as autoexec.

--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Nov 13 '05 #2

P: n/a
While I'm not a proponent of macros, I certainly don't see what's so
"hideous" about the autoexec one!

In Access 97 (and, in fact, all subsequent versions), you have two startup
options: you can use an autoexec macro, or you can specify a form to be
opened at startup. I'll often use an autoexec macro, though, with a single
command: to run a VBA routine.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"MLH" <CR**@NorthState.net> wrote in message
news:u7********************************@4ax.com...
Did A97, perchance, do away with the need for
an AutoExec macro to initiate an autoexec sequence
for databases? Or, must we still suffer with that hideous
macro?

Nov 13 '05 #3

P: n/a
MLH
There ya go! I like it.
xxxxxxxxxxxxxxxxxxxxxxxxxxx

I use an opening form and the on open event of that form. If I just
want the procedures to do stuff but don't want that particular form up,
after all the procedures run by the on open event are done, I plop in
Cancel = True.

This does pretty much the same as autoexec.


Nov 13 '05 #4

P: n/a
MLH
Ha! I guess I overdid it with the "hideous" parameter. Actually,
its from back in my original days first working with Access 2.0.
I didn't know anything about Access Basic and was afraid to
start with it. So, I did everything in macros for about a year.
Finally, I bit the bullet. IT TOOK ME YEARS to port over all
the macros crap I had built. At the risk of being scorned, I really
do think they're hideous!

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxx
While I'm not a proponent of macros, I certainly don't see what's so
"hideous" about the autoexec one!

In Access 97 (and, in fact, all subsequent versions), you have two startup
options: you can use an autoexec macro, or you can specify a form to be
opened at startup. I'll often use an autoexec macro, though, with a single
command: to run a VBA routine.


Nov 13 '05 #5

P: n/a
It is still there, and for compatibility, you would not want to change
this..as you would then break zillions of databases.

As others have mentioned, using the startup form is often the solution. (the
option is in tools->startup).

In some cases, such as a back end file, when users click on it, I give them
a message about not having permissions, and then shut down ms-access. (this
keeps them out of the back end..and no security is needed).

In this case, since I do NOT need a form, nor do I want to use the preferred
startup setting in tools->startup, then I do use a macro.

that macro simples has:

Msgbox
Message : You do not have permissions to run this file
beep: yes
Type:critical
Title Cannot run

And, then the next line of the macro is

Quit
options:exit

So, in the above, I don't have to add a code module, I don't have to add a
startup form. Yet, I get a nice message telling the user they can't use the
back end file. So, in this example, a macro is preferred. No forms, no
modules, and not even a worry about broken refs, or having code to run. The
only thing I needed to add was the above autoexec macro...

you can also use the runcode "action" in a macro, and it can call any
function you have in code....
--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pl*****************@msn.com
http://www.members.shaw.ca/AlbertKallal
Nov 13 '05 #6

P: n/a
KEEWWWLLLLLLL !!!!!!

Never thought of this before... gonna use it ALWAYS now! LOL

SilvrT
Burnaby, BC, Canada

Nov 13 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.