Need to disable a menubar command


G

Guest

Is there a way to disable a menubar command. Specifically, I need to disable the EDIT > DELETE RECORD command.

The application I've developed will physically delete a record using a custom button under VB control. this is necessary because deleting a record in this application could affect several tables

Thanks
Rich
 
Ad

Advertisements

A

Albert D. Kallal

I would actually provide a custom menu bar..and then make the edit->delete
record run your custom code (this is actually what I do!). Then, you don't
have to train your users. (or get support calls as to why the delete record
option disappeared...and make your users angry).

You can generally display a command bar via:

CommandBars("menu bar").Controls("records").Controls("refresh").Visible
= True

So, try something like:

CommandBars("menu bar").Controls("Edit").Controls("Delete
record").Visible = false


If you want to see a few screen shots of menus in ms-access..check these
screen shots..(I also explain why I think menus are great idea).

http://www.attcanada.net/~kallal.msn/Articles/UseAbility/UserFriendly.htm
 

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

Disable/Dim menubar drop down item 0
MenuBar Question 1
Export menubar 1
MenuBar properties 9
How to control menubar 2
Change menubar - VBA 0
Change a MenuBar at Runtime 1
MenuBar - hide it immediately 2

Top