start up task but not an autoexec

G

Guest

A very simple way to start some codes running after an Access database starts
is to write an autoexec macro. The second way is to start access with a batch
file and in it, quote the specifi macro name after the /x switch. All these I
am quite familar with. I can use write NORMAL codes to disable certain Access
menu also.

I am quite happy to employ one of these methods to achieve what I want to
do. But problem is: in front of me I need to work with a mdb file designed by
others. When I double-click it, a form is opened automatically. However, I
couldn't find a autoexec macro in it. If I press the shift key to start the
mdb file, I can write a dummy macro and name it "autoexec" without a problem.
The start up function (written by someone) hides the view menu (one way to
disable switching to form design view) , hides the database window, and hide
the tools menu etc.

Does someone know how these could be achieved without putting codes under a
macro?

I don't have any clue now. But if I open up the Visual basic editor (after
disabling the macro) I found the project contains references to acwztools.mde
and acwzmain.mde, which I am unfamilar with. Both acwztools and acwzmain are
shown as part of the project when viewed under the project explorer window. I
do some research on acwzmain & acwzmain but no help. Can someone enlighten me?
 
N

Nikos Yannacopoulos

If you look at Tools > Startup, you'll see the name of the form in
Display Form/Page; that opens the particular form when the database is
opened (unless you hold Shift). The code run is most likely in the
form's On Open or On Load event.

HTH,
Nikos
 
G

Guest

Thanks. The first part of your answer is right. I overlooked the start up
option as I seldom use it. I am familar with using open or on load event.
But I couldn't find any on open or on load event with the start up form.

ykffc
 
N

Nikos Yannacopoulos

I was referring to the form's On Open or On Load event. Check the form's
properties, tab Events.

HTH,
Nikos
 
G

Guest

Furthermore, if the form is started manually. The various menu options do not
disappear.
 
N

Nikos Yannacopoulos

Hmm... wild guess, but have you checked that there is no *hidden*
autoexec macro? Check Tools > Options, tab View, to see if Show Hidden
Objects is checked (default is no!).

Nikos
 
G

George Nicholson

Furthermore, if the form is started manually. The various menu options do
not disappear.

Open a code window and Edit>Find for "view" (or any other disabled feature).
See if you can find the batch of code that hides/disables the menu and then
back track that routine to see how/where it is called.

Another other possibility is that you are looking at a custom menu (a copy
of the built-in menu except for View) and the original developer disabled
all built-in menus (Access UI: Tools>Startup). Check Tools>Customize to see
what the name of the visible menu is (it will be checked). Check it's
properties. AFAIK, if "Restore Defaults" is available, it is a built-in
menu. If it isn't, its a custom menu (it has no defaults to restore).
 
G

Guest

Seems none of these replies could answer. Need a copy of the file? Just give
me your email address that could be deleted afterwards!
 
N

Nikos Yannacopoulos

Mine is available here, just do the obvious... and before you mail,
compact and zip please, I have a slow connection!

Nikos
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top