# VBA code to close Access



## azirion

I need to program a button that exits Access, not only the database. For example, if I use Docmd Close, it closes only the database not the whole Access program.
Does anybody knows the command to achieve this?


----------



## THoey

I think you are looking for DoCmd Quit


----------



## azirion

Right on Terry! Thanks a bunch.

Here's another one:
In VB 6.0 you can make control arrays easily, how the heck do you make them in VBA?


----------

