Guys, I'm in a bit problem & need help...

My problem is:
In my project I've several forms (almost 30) and 1 MDI form. Now when I'm connecting to the database (MS Access) I want when the MDI form will be opened the database will b connected & as soon I close the MDI it will be disconnected. Otherwise for database connectivity I've to write the code for every form .
Do I have to take a module??
Plz suggest what should b the best approach to it.

Yes, a module with public declared variables would be the easiest bet. Then in form load open the database and in form unload close the database.

Good Luck