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 a database or quit Access
- [Instructor] When you or your users have finished their work in Access, you should close the program to free up system resources and prevent anyone from viewing or manipulating data they may not need to see. In this movie, I will show you the VBA code that you use to close a database or quit access. I'm working in the course database, and I've opened the quit or close form. This form has two buttons on it, close database and quit access. Let's say that I want to add a macro to the close database button to close the current data base. To do that, I need to switch to design view, so on the home tab I'll click the view button's down arrow and click design view. Then I will right click the close data base button. Click build event which is the item at the top of the shortcut menu. Then in the choose builder dialogue box, I'll click code builder, and click okay, and when I do I get a code module, and you see that, in this case, it's labeled command0_click, so when I click command0…
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)
-
-
-
-
-