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
- [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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
(Locked)
Open a form4m 6s
-
(Locked)
Open a report4m 29s
-
(Locked)
Open a table3m 30s
-
(Locked)
Open a query3m 59s
-
(Locked)
Close an object6m 36s
-
(Locked)
Close a database or quit Access3m 34s
-
Run a menu command3m 17s
-
(Locked)
Print the active database object3m 21s
-
(Locked)
Display or hide warnings4m 26s
-
(Locked)
-
-
-
-
-