Function CreatePassWordDB(strPathName As String, strPsd As String) As Boolean On Error GoTo Exit_ERR Dim wrkDefault As Workspace Dim NewDB As Database CreatePassWordDB = False Set wrkDefault = DBEngine.Workspaces(0) If Dir(strPathName) <> "" Then Kill strPathName Set NewDB = wrkDefault.CreateDatabase(strPathName, dbLangGeneral & ";pwd=" & strPsd & "") NewDB.Close Set NewDB = Nothing CreatePassWordDB = True Exit Function Exit_ERR: |
|站长邮箱|小黑屋|手机版|Office中国/Access中国
( 粤ICP备10043721号-1 )
GMT+8, 2025-4-4 19:40 , Processed in 0.080885 second(s), 16 queries .
Powered by Discuz! X3.3
© 2001-2017 Comsenz Inc.