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.
Close an object
- [Narrator] When a user finishes working with a database object, they can close it through the user interface. However, if you'd like to close an object programmatically, you can use the do command dot close method. I'll demonstrate how to do that in this movie. I am working in the course database, and I have the Close Objects form open, as well as the Customers table, Products report and Categories form. We'll work with all three of those other objects in a moment. The Close Objects form, has three command buttons on it and those are to close the form, close the report, and close a table. We'll start by closing the Categories form. To assign VBA code to a command button I need to be in Design View. So I'll go ahead and on the Home tab, click the View button's down arrow and click Design View. And then I will right click the Close Form button. At the top of the shortcut menu there's the Build Event menu item, so I'll click that. Then in the Choose Builder dialog box I'll click Code…
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)
-
-
-
-
-