
Problem opening a password protected .MDB
As a beginner programmer I just had to figure it out so here is the answer:
If you are using a DATA object, in the FORM LOAD procedure type in the
following code:
WITH DATA1
.DatabaseName = "c:\wherever the files is\database.mdb"
.RecordSource = "NameOfTheTable"
.Connect=";Pwd=WhateverThePassword"
.Refresh
END WITH
Feel free to cut and paste this and just change the path, table name, and
the password.
Rafal
Quote:
>Hello,
>I'm trying to open a password protected access97 database :
>Set DB = Ws.OpenDatabase(Db_name, , , "pwd=secret")
>I always get : Run-time error 3031 - Not a valid password
>Can anyone help ?
>Thanks, Wim