Need to disable a menubar command



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




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).

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