Access toolbar Programming

xMax

Registered User.
Local time
Today, 13:08
Joined
Aug 7, 2006
Messages
35
I need to know how to make a command button on a toolbar open a form. The code has to work for each and every form I have.
 
I'm still a little confused. I know what the Module does but how do I get to respond to a toolbar-button click event?
 
You need to get to the properties of the button and then put code in the ON Action Field.


Have a look at the sample db posted where its alll working togther.
 
Ok, now I have a question about the Application.CommandBars("nameoftoolbar") function.

I have a toolbar with a menu with command buttons inside, sort of like this.


toolbar name is toolbar

A menu on the toolbar is file
on file is changepassword
quit
save

How do I make the changepassword field disabled?

I know this won't work:
Application.CommandBars("toolbar").Controls("changepassword").Enabled = false

This won't work either:

Application.CommandBars("file").Controls("changepassword").Enabled = false

Neither will this:

Application.CommandBars("toolbar").Controls("file").Controls("changepassword").Enabled = false

I need to know what will work.
 
Application.CommandBars(name).Controls("changepa ssword").Enabled = false


should work - where name is the title at the top of the properties form for button changepassword
 

Users who are viewing this thread

Back
Top Bottom