DAO:
Set DB = OpenDatabase(DatabaseName, False, False, ";Pwd=密码")ADO:
cnn.ConnectionString = "................." & ";Jet OLEDB:Database Password=密码"