I have no problrm opening password protected Access database with OpenDatabase:

Set a = OpenDatabase(my_db, False, False, ";PWD =" & pass)

but when I tried to open table from the same database with Data control like this:

Data1.RecordSource = "select * from dis where title='" & my_title & "'"
data1.Refresh

I get error: "Not a valid password" which is what I expected.

How should I open database?

Thnx, Ermin

VB5, SP3