You need to define the connection with public scope in the module and you would be required to the procedure Sub main().
In the sub main() procedure open the connection, check if its connected and then show the appropriate form. you would be required to set sub main as the startup of project.
Best Luck..
Nilesh