Enabling Allowbypasskey with DB that has a password

  • Thread starter Jasemc2 via AccessMonster.com
  • Start date
J

Jasemc2 via AccessMonster.com

I down loaded the database shiftkey2000 that allows you to select a database
and enable or disable the shift key. This works on all my databases however
there is one that I cannot unlock. The code bums out and says I don't have a
valid password. There is a startup password and I tried to add that to the
code but it did not work. any suggestions.

Private Sub Command4_Click()

If IsNull(Me.Text0) = False Then

Dim MyDb As Database
Dim strConnect As String

strConnect = "pwd=mypassword"

Set MyDb = OpenDatabase(Text0, , , strConnect) ' This was just
(Text0) I tried adding the password to the database.

MsgBox ("Enable set, result = " & ChangeProperty("AllowBypassKey",
dbBoolean, True, MyDb))
End If
 
A

Albert D. Kallal

strConnect = "pwd=mypassword"

try:
"MS Access;pwd=mypassword"


Of course, change mypassword to your password
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top