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 / Modules / DAO / VBA / December 2007

Tip: Looking for answers? Try searching our database.

Calling a VBA Routine

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MarkS - 13 Dec 2007 01:55 GMT
Hi,

I have a button on a form which I want to run a piece of VBA code. It is in
a module called mdl_Control and the routine is called Control
How do I do this

Thanks MarkS
Ken Snell (MVP) - 13 Dec 2007 02:09 GMT
Note that Control is a reserved word in ACCESS, so it's possible that you
will get errors with your attempt. I strongly urge you to change the name of
the "routine" to something other than Control. Change it to ControlRoutine.
Then use the button's Click event to run VBA code similar to this:

Private Sub ButtonName_Click()
Call ControlRoutine
End Sub

Signature

       Ken Snell
<MS ACCESS MVP>

> Hi,
>
[quoted text clipped - 4 lines]
>
> Thanks MarkS
 
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.