Startup form - how to call DoCmd.ShowToolbar "Menu Bar", acToolbar

G

Guest

Access 2002. My startup form displays the default Menu Bar.
Got
DoCmd.ShowToolbar "Menu Bar", acToolbarNo
in the forms "On " etc properties eg. OnActivate or OnOpen etc. Works fine
(no Menu Bar displayed) when I open the form after I've opened Access,
however when I startup up by double-clicking the .mdb file in Windows
Explorer, the form opens but the Menu Bar is displayed. Obviously the events
OnActivate, OnOpen etc. don't trigger. How do I get an action the does
DoCmd.ShowToolbar "Menu Bar", acToolbarNo? Where do I put this code? Thanks.
 
N

Nikos Yannacopoulos

Mark,

Not sure, but I suspect this is a timing thing; try the On Load event,
which fires later than the On Open one.

HTH,
Nikos
 
G

Guest

Tnx Nikos, I really appreciate your reply. I tried all the "OnXxxx" options:
OnActivate, OnLoad, OnFocus, OnOpen etc. in the Form's Property list, but
none of them work. A colleague here experienced similar issues with Excell
programming: the startup by double-clicking the .mdb file icon must not be
the same as if I open the form once I've opened Access (whereby any of the
"OnXxxx" actions fire, and executing the DoCmd etc. A higher-level action
must occur.
 

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

Similar Threads


Top