I found a way to open a database without using INI files at all.
Set dbMyDatabase = OpenDatabase(Name:=App.Path & _
"\protected-database.mdb", Exclusive:=False, _
ReadOnly:=False, Connect:=";PWD=marvin")
Just provide the password as part of the connect string.
This tip is reprinted from the VB Tips & Tricks Volume 1 book.
Parts of this tip was submitted by: David McCarter
Discover more from dotNetTips.com
Subscribe to get the latest posts sent to your email.
