Access is a popular choice for a database GUI. There is no need to know how to connect with a specific database from Access as long as we know how to use an ODBC connection. To make everything fully automated it is even possible to add such a connection with a simple VBA script, maybe not so simple but it is still possible.

This idea behind, is to edit the system registry using VBA. On the MSDN site there is a KB184608 document describing how to create a DSN connection for SQL Sever. Most of the code comes from there, but not all of it.

To be able to use functions defined in DLL files, we need to declare them at the very top of the VBA code.