set e.Cancel then then Exit Sub immediately... no need to keep re-checking it... set it, then bail.


I wouldn't create a db connection, unless you're only using that to test for the db, and you close it. Ideally when you do need a connection, you create it, do your stuff, and close it... don't leave it hanging around. It's like shopping... get in, get what you want, and get out.

-tg