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

A97: How to hide ALL the tool bars?

P: n/a
The following lines are running when I open my A97 mde file...

If CurrentUser() <> "mlh" Then
Application.SetOption "Show ToolTips", False
Application.SetOption "Key Assignment Macro", "NonExistent"
Application.SetOption "Built-In ToolBars Available", False
End If

But a toolbar still appears even though these lines have been
processed. Not surprising, really. These lines came from old
Access 2.0 applications and may not be doing anything when
running under A97. Dunno.

What should I be running to hide all the toolbars from the user?
Nov 13 '05 #1
Share this Question
Share on Google+
4 Replies

P: n/a
You are probably referring to setting the startup properties of the
database. If you want to set them through code, refer to the Access
help at this location:

Note, though, that the startup settings are applied only when the
database is opened...what you probably want to do, since you want it to
be based on the user (which would have to happen after the database was
opened), is loop through the CommandBars collection and disable all of
the builtin ones.

Nov 13 '05 #2

P: n/a
I'm afraid looping through command bars is
something I'm not familiar with. Is there some
sample code out there for that? Or maybe
you can contribute a line or two.
Nov 13 '05 #3

P: n/a
for each cb in commandbars
cb.enabled = false

I think that they have a builtin property too, so you could go:

if cb.builtin = true then cb.enabled = false

Nov 13 '05 #4

P: n/a
Thx, I'll give it a try.
Nov 13 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.