How to Add Command Button on Forms in MS Access

This article addresses the importance and use of Command Buttons, while also illustrating steps to properly use it.

Command Buttons are basically used for providing database access to functions like opening related forms or saving or for printing data. Command Button is used for starting an action or for running multiple actions, which help other functions in getting access to the database from which the data is restored and the query is solved. For example, a user can create a Command button in a form to open a different form. In order to run a Command Button, users need to write an event procedure or macro in the On Click Property.Steps To Add Command Button On Forms

Steps to Add Command Button on Forms

In this section, you will learn to add Command Buttons in an MS Access file.

  • Step 1: Select and open the Form in which you want to insert the Command Button. Make sure to close all the other forms running in the system to avoid any confusion.
  • Step 2: Right-Click on a Form and open it in Design Mode.
  • Step 3: Now select the Design Tab from the Ribbon Bar. And then click on Button Icon.
  • Step 4: Users might notice that their cursor has turned into a plus sign that also has a button like a picture attached to it. Users need to use their cursor to draw or create a structure of button on their form.
  • Command Button WizardStep 5: Once the user has created the new button in the form, a Command Button Wizard will automatically appear on the screen. Typically a Command Button can invoke a preset function on a form. It can also launch on a Macro or through a custom VBA code.

Users can implement these changes by selecting Form Operation from the Categories Window > Print Current Form from actions window. Then click on next.

  • Step 6: This next step gives the user two options, either to use a picture or an icon on the Command Button or to use a text title on the button.

Users can make these changes using the Command Button Wizard, where MS Access also allows users to browse pictures from their system. To apply the change on the form, click on Finish.

  • Step 7: Now the users need to give a name to their button, using the Command Button Wizard.

Tip: It is advisable to appoint a meaningful and relevant name to the button so that its purpose is understandable to all the users. Focus on the button name specifically if you are adding it to a Form or a work-related database.

  • Step 8: Once you have made all the necessary changes save the form. Also, ensure to view the form after saving it. We also recommend you to run the Command Button, to ensure that it is working properly in the Form.

Just like any other object in a Form, Buttons also have a large number of properties which can use and set to customize how a button should appear in a form. Users can make these changes as many times as they like, but they should ensure that the form is not being used at the time of these updates and customizations.

A database crash can lead to Access damage which can compromise all data present in the database. In case you encounter such a situations, call in a cutting edge recovery tool like DataNumen Access Repair.

Author Introduction:

Vivian Stevens is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including sql fix and excel recovery software products. For more information visit www.datanumen.com

Leave a Reply

Your email address will not be published. Required fields are marked *