From the course: Access: VBA

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Open a form

Open a form

From the course: Access: VBA

Start my 1-month free trial

Open a form

- [Presenter] When you develop an Access application for your users, one common task you will have and perform is opening forms, reports, and other objects. In this movie I will show you how to assign a VBA macro to a command button that opens a form. I'm working in the course database, and I've opened the open form form. This is a relatively straightforward form. I have a label for display products form, and then a button with products on the label. As you suspect, I want to assign VBA code that opens the products form to the products button. So, I will switch over to design view, I'll go to the home tab of the ribbon, click the view button's down arrow and click design view. Then I will right click the products command button and click build event. Then in the choose builder dialog, I'll click code builder and click OK. In the visual basic editor I have a code module that contains a new subroutine called Command21_Click. The command button I created was assigned the internal…

Contents