Create a command button

Create a command button

You can create a command button on your own, or you can have Microsoft Access create your command button for you using a wizard. A wizard speeds up the process of creating a command button because it does all the basic work for you. When you use a wizard, Access prompts you for information, and then creates the command button based on your answers.

You can create over 30 different types of command buttons by using the Command Button Wizard. For example, you can create a command button that finds a record, prints a record, or applies a form filter.

It's also a good idea to use the Command Button Wizard if you want to learn how to write event procedures. When Access creates a command button in a form or report with a wizard, it creates an event procedure and attaches it to the button. You can open the event procedure to see how it works and modify it to fit your needs. When you create a command button on a data access page with a wizard, Access doesn't create event procedures for you. Learn about creating event procedures for a command button on a data access page.

Note   Wizards are not available in a stand-alone data access page, or when you point a data access page to a database other than the one currently open. The Command Button Wizard is also not available if a data access page isn't bound to a table or query. You will have to create a command button on your own if wizards aren't available.

What do you want to do?

Create a command button with a wizard

Create a command button on my own