Solved

Assign a a macro to button on user from

Posted on 2013-11-21
2
484 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Familiarize people with the process of utilizing SQL Server views 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 Access…
Familiarize people with the process of utilizing SQL Server stored procedures 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 Micr…

710 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