xMax
08-07-2006, 06:06 AM
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.
|
View Full Version : Access toolbar Programming xMax 08-07-2006, 06:06 AM 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. Pauldohert 08-07-2006, 06:10 AM http://www.access-programmers.co.uk/forums/showthread.php?t=111190 xMax 08-07-2006, 06:16 AM 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? Pauldohert 08-07-2006, 06:21 AM 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. xMax 08-07-2006, 08:11 AM 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. Pauldohert 08-08-2006, 06:08 AM 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 |