Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / July 2007

Tip: Looking for answers? Try searching our database.

Custom Toolbar Button

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bob Howard - 31 Jul 2007 15:36 GMT
Is it possible to fire an event when the user clicks a custom toolbar
button?

Bob
Marshall Barton - 31 Jul 2007 17:13 GMT
>Is it possible to fire an event when the user clicks a custom toolbar
>button?

Tool (and menu) bar items have their own interal click event
that calls the function you specify in your custom command
bar item's OnAction property.

The built-in command bar items call their own internal
procedure.  You can change the OnAction property of the
built-in buttons, but it would be a bad thing because it
would change the items behavior across your entire
applcation (and maybe even all of Office).  Instead create a
new command bar item and use your own code to do what you
want as well as what the real item does.

Signature

Marsh
MVP [MS Access]

Maurice - 31 Jul 2007 17:16 GMT
You could assign a macro to it.
Signature

Maurice Ausum

> Is it possible to fire an event when the user clicks a custom toolbar
> button?
>
> Bob
Albert D. Kallal - 31 Jul 2007 19:30 GMT
I am not sure what you mean by "fire an event"

You can certainly have a custom button call VBA code (that normally how I
use custom menu items).

That code can most certainly "call" some event code you have in a form.

So, if you wanted to call the after update event of a particular control,
say "company" name after update event, the you could simply put a pubic
function in your form call

Public Function MyCoAfterCall

  Call CompanyName_AfterUpdate

end if

and, then for the custom menu/tool bar on-action, you go

=MyCoAfterCall()

Signature

Albert D. Kallal    (Access MVP)
Edmonton, Alberta Canada
pleaseNOOSpamKallal@msn.com

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.