' enablePassKey ("c:\db1.mdb") Public Function enablePassKey(ByVal strFileName As String) As Boolean
' enablePassKey ("c:\db1.adp")
On Error Resume Next
Dim acc As Object
Set acc = CreateObject("access.Application")
acc.OpenCurrentDatabase strFileName
acc.CurrentProject.Properties.Add "AllowByPassKey", True
acc.Quit
If Err.Number = 0 Then enablePassKey = True
End Function