start up task but not an autoexec

  • Thread starter Thread starter Guest
  • Start date Start date
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?
 
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
 
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
 
I was referring to the form's On Open or On Load event. Check the form's
properties, tab Events.

HTH,
Nikos
 
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
 
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).
 
Seems none of these replies could answer. Need a copy of the file? Just give
me your email address that could be deleted afterwards!
 
Mine is available here, just do the obvious... and before you mail,
compact and zip please, I have a slow connection!

Nikos
 
Back
Top