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 / General 1 / April 2006

Tip: Looking for answers? Try searching our database.

CommandBarButton OnAction Property

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Vincent - 12 Apr 2006 22:39 GMT
I was wondering if the CommandBarButton OnAction property would allow
you to specify a function from a module to be called.  According to the
post made by Turtle in 1998, the OnAction property can only specify a
macro name.  Is this still the case?  I agree with Turtle that "this is
pretty funky."

-Vincent

From:      Turtle - view profile
Date:       Sat, Nov 21 1998 4:00 am
Email:       "Turtle" <macderm...@mindspring.com>
Groups:   comp.databases.ms-access,
microsoft.public.access.modulesdaovba

OnAction has to be a macro name.  However, this macro can contain only
the
one command RunCode and refer to a function (not a sub, but it ignores
any
value the function returns.)

Personally, I think this is pretty funky.  It's one of the few places I
know of where professional programmers use macros.

- Turtle
Vincent - 12 Apr 2006 22:43 GMT
Also, are there any alternatives to the CommandBars for easily creating
popup menus in VBA?  Thanks.

-Vincent
Rick Brandt - 13 Apr 2006 02:52 GMT
> Also, are there any alternatives to the CommandBars for easily
> creating popup menus in VBA?  Thanks.
>
> -Vincent

In the Customize dialog for command bars you can change any of them that you
have created to type Popup.

Signature

Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt   at   Hunter   dot   com

Rick Brandt - 13 Apr 2006 02:50 GMT
> I was wondering if the CommandBarButton OnAction property would allow
> you to specify a function from a module to be called.  According to
> the post made by Turtle in 1998, the OnAction property can only
> specify a macro name.  Is this still the case?  I agree with Turtle
> that "this is pretty funky."

No it can be the name of a public function.  It just can't be a sub-routine.

Signature

Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt   at   Hunter   dot   com

Lyle Fairfield - 13 Apr 2006 04:14 GMT
"Vincent" <animedreamer@verizon.net> wrote in news:1144877963.868769.220530
@z34g2000cwc.googlegroups.com:

> I was wondering if the CommandBarButton OnAction property would allow
> you to specify a function from a module to be called.  According to the
[quoted text clipped - 20 lines]
>
> - Turtle

One can specify the name of a public function and one can specify
parameters for the function as literals as
cbc.OnAction = "=GetComments(1)"
(as per Terry Kreft 2006-01-24)

Signature

Lyle Fairfield

 
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.