menus

T

tw

Is it possible to create a custom menu that includes some of the features of
the built-in menus. I have tried to figure out how to create a menu, but
I'm just hitting a mental block.

Basically I want to show there features of the default menus, but only when
appropriate for the user's permissions. I also want to remove some of the
default menu items altogether. I don't really need any special menu for my
program as all features are available from an enhanced switchboard that I
created that is more flexible than the switchboard available.

When the switchboard is the active window...
The only option I want from the "file" menu is "Close"
All the features of the "edit" menu except "Groups" and "Add to Groups"
Nothing from the "insert" menu.
From the "tools" menu I would like "Database Utilities"|"Compact/Repair" for
users in the Admins group only.
Also from the "tools" menu for users in the Admins group I would like
"Security"|"User and Group Permissions" and "User and Group Accounts"
From the "window" menu everything except "Hide" and "Unhide"
from the "Help" menu nothing except custom help options.

When a form is the active window...
add the "records" pad
include the insert pad for new record

I'm user access 2002 the database is version 2000.
I've cruised the help on creating menus, I just don't get it. I've created
menus in other db programs, but for some reason Access is eluding me.
 
A

Albert D.Kallal

First, give my sample application a try. note how each form shows different
menu options.

http://www.members.shaw.ca/AlbertKallal/msaccess/DownLoad.htm

grab the 3rd one "hidden interface"

note how ALL of the ms-access interface is hidden. Note how those menus
change options from form to form.
This whole thing takes NO code to make those menus. And, no code was needed
to hide all of ms-access either (I just used tools->startup)

A good starting tutorial on menus can be found here:

http://www.microsoft.com/Accessdev/articles/bapp97/chapters/ba01_6.htm
 
T

tw

thanks,
I'm not sure why I can't open samples that are posted in the newsgroup. It
tells me to copy it inside my intranet then try to open again. I've
extracted the files to my c:\somefolder\ but it doesn't work.

However I followed the link for the menu tutorial and that was all I needed.
Thanks again.
 
T

tw

I do have another question. I've just created two menus... One to display
upon startup and on the switchboard form, another to display on other forms.
Now upon startup, I see both of the custom menus I created. I only want one
menu at a time. How do I change that?

On startup I've defined the name of the custom startup menu I created.
On the switchboard form I've put the same menu in the menu bar property.
On another form, I've put the second custom menu I created in the menu bar
property.

When the program starts, I see both the menu I intended as the startup menu,
and I also see the menu I intended as the menu specific to certain forms.
The type property of both custom menus is menu bar. Is that the problem?
 
A

Albert D.Kallal

You really should be able to download my sample. I don't know why it you
cant download it.

I do have another question. I've just created two menus... One to display
upon startup and on the switchboard form, another to display on other
forms. Now upon startup, I see both of the custom menus I created. I only
want one menu at a time. How do I change that?

Hide both of those menus (right click on the menu, ->customize-> select
toolbars tab. Now, un-check the two menus.
On startup I've defined the name of the custom startup menu I created.

Excellent, when you run the application, now your menu bar will show.

On the switchboard form I've put the same menu in the menu bar property.
On another form, I've put the second custom menu I created in the menu bar
property.

Good. just remember, you don't want to leave those menus lying all over the
place in plan view. So, make sure you hide them, and not have them displayed
when you distribute the application. So, use the startup settings, and the
forms menu setting (in the other tab) to make the menus display. The only
time you will force, or simply "display" the menu is during customization
when you are working on it. When you are done, you un-show as I explained
above. (it would be strange to have 15 or 20 menus all showing at once!!).

Of course, during development, you will hold down the shift key so your
startup settings don't run. You then develop for awhile, and then to test in
"user" mode, you exit..and then re-enter the application without the shift
key bypassed. You will likely do this dance all day long as you run/test as
user mode, and then flip back in to developer mode (shift key used..so you
don't get the main custom menu). So, you can't deveop, or really modify
things when you run your appliation with the startup settings...so you must
shift-by-pass them when you want to work.
 
T

tw

It downloads no problem, the problem is after I download and extract. The
problem occurs when I try to run the application. First I get a security
warning message that asks me if I want to open the file from Unknow
Publisher. When I click on Open, Access gives me the message Microsoft
Access cannot open this file. The file is located outside your intranet or
an untrusted site. Microsoft Access will not open this file due to
potential security problems. To open the file copy it to your machine or an
accessible network location." The file is already on my c: drive. So I'm
assuming it is the security problem that is causing the issue. Yours is not
the only one I have had problems with. I just haven't figured out why.
It's probably a security setting in Access, but I spent time to find it yet.
Not a priority.

But, I've created the menus that I want, and they work just fine. Except
that both menus show up on start up. I only want one menu at a time, not
both. See my post for details. Do you know why this might happen?
 
T

tw

disregard the duplicated question. I didn't read far enough in your post to
see that you already answered. Sorry. I have it solved now.

Thanks
 
T

tw

One more question, then I'm done. Somehow I added to my menu the built-in
menu for Records and it didn't show up in design so I tried to add it two
more times. Now I have the records drop down on my menu three times, but
when in design mode I don't see any of them to remove. Do you know how I
can remove these from the menu since I can't see them to drag them off
during design view?
 
A

Albert D.Kallal

tw said:
One more question, then I'm done. Somehow I added to my menu the built-in
menu for Records and it didn't show up in design so I tried to add it two
more times. Now I have the records drop down on my menu three times, but
when in design mode I don't see any of them to remove. Do you know how I
can remove these from the menu since I can't see them to drag them off
during design view?

Hum, you should be able to drag them off. Try opening the application with
the shift by-pass. now, open that form that shows the menu. Then, right
click the menu and customize. You should be able to see the those extra menu
items..and simply dragging them off the bar to "no where" will delete them.

And, by the way, for that secirty problem, you can try:

Try right-click on the file, view the properties, and press the [Unblock]
button in the lower right. Then the
file should work..
 
T

tw

I couldn't see them in design view which is why I added so many. But after
I several attemps going into and out of design view, not sure why, but they
finally showed up so that I could drag off the menu. Thanks

I was also able to upblock and open your sample. Thanks for you help.

Albert D.Kallal said:
tw said:
One more question, then I'm done. Somehow I added to my menu the
built-in menu for Records and it didn't show up in design so I tried to
add it two more times. Now I have the records drop down on my menu three
times, but when in design mode I don't see any of them to remove. Do you
know how I can remove these from the menu since I can't see them to drag
them off during design view?

Hum, you should be able to drag them off. Try opening the application with
the shift by-pass. now, open that form that shows the menu. Then, right
click the menu and customize. You should be able to see the those extra
menu items..and simply dragging them off the bar to "no where" will delete
them.

And, by the way, for that secirty problem, you can try:

Try right-click on the file, view the properties, and press the [Unblock]
button in the lower right. Then the
file should work..

--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
(e-mail address removed)
http://www.members.shaw.ca/AlbertKallal
 

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