Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Run a Module from a Command Button

Posted on 2011-03-10
3
Medium Priority
?
416 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
ID: 35096340
Assign macro's name to button's onClick event.
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 35096343
select [Event Procedure] in the click event of the button
0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 2000 total points
ID: 35096362
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

NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

926 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