Solved

Assign a a macro to button on user from

Posted on 2013-11-21
2
474 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
2 Comments
 
LVL 9

Accepted Solution

by:
QuinnDex earned 500 total points
Comment Utility
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
Comment Utility
Thanks for the feedback. ...excellent
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
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…
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…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

744 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

18 Experts available now in Live!

Get 1:1 Help Now