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

Close a database or quit Access

From the course: Access: VBA

Start my 1-month free trial

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…

Contents