Solved

Run a Module from a Command Button

Posted on 2011-03-10
3
357 Views
Last Modified: 2012-05-11
Using Access 2007.

I've created a Macro in Access.  I then created a Form and Command button that will run the Macro.

I then converted the Macro to a VBA module and added some additional steps to the VBA.  How can I run the converted macro from the same button?  It only gives the option of running macros?

Thanks
0
Comment
Question by:tfewster500
  • 2
3 Comments
 
LVL 19

Expert Comment

by:Bardobrave
Comment Utility
Assign macro's name to button's onClick event.
0
 
LVL 119

Expert Comment

by:Rey Obrero
Comment Utility
select [Event Procedure] in the click event of the button
0
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 500 total points
Comment Utility
select [Event Procedure] in the click event of the button, then click on the (...)

in the vba window

private sub button_click()

' call the function/sub here
end sub
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now