Solved

Assign a a macro to button on user from

Posted on 2013-11-21
2
482 Views
Last Modified: 2013-11-22
Hi Experts

I have a userform with a command button in ms access 2003 and I would like the button to call/run my macro Private Sub cmdMyButton_Click

how would I do this....what are the steps...
0
Comment
Question by:route217
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 9

Accepted Solution

by:
QuinnDex earned 500 total points
ID: 39668233
Open a form or a data access page in Design view.

Make sure the Control Wizards Button image tool in the toolbox is not pressed in. This turns off the wizard.

 In the toolbox, click the Command Button tool Control.

On the form or data access page, click where you want to place the command button.

Make sure that the command button is selected, and then click Properties Button image on the toolbar to open the command button's property sheet.

In the OnClick property box on a form, enter the name of the macro or event procedure that you want to run when the button is clicked, or click the Build button to use the Macro Builder or Code Builder. On a data access page, you can attach code written in either JScript or Microsoft Visual Basic Scripting Edition (VBScript) to a command button by using the Microsoft Script Editor.

Do one of the following:

To display text on a command button on a data access page: Type the text in command button's Value property box.

To display text on a command button on a form: Type the text in the command button's Caption property box.

To display a picture on a command button on a form: In the command button's Picture property box, type the path and file name for a .bmp, .ico, or .dib file. If you're not sure of the path or file name, click the Build button Button image to open the Picture Builder.
0
 

Author Comment

by:route217
ID: 39668351
Thanks for the feedback. ...excellent
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

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…
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

756 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