"Not a valid password" message

G

Guest

When I coding "DoCMD.RunSQL 'Select <some field> FROM <a table> IN <another
database>' " but that database is password protected, I always get "Not a
valid password" message.

Could anyone help me on this?

Thanks.
 
G

Guest

Help you in what way? You mean how can you supply the password in your
code? if so look at

http://groups.google.ca/group/micro...read/thread/3e847ea236aa4815/42bdffa21467982f

A brief extract from the post is below

Here is a bit of the code which works:
dbName is a variable containing the path and db name.


SQLString = "SELECT Min([Date ToR Agreed]) AS MinDate FROM BarChart Barchart
IN '" & dbName & "';"

Set db = OpenDatabase(dbName, False, False, "MS Access; pwd=ThePassword")
Set rs = db.OpenRecordset(SQLString)

If this isn't what you need as help, please explain what you need help with
exactly.
 
G

Guest

It seems that there's no simple way to run the SQL command to get data from
another password-protected database and then insert them into current
database.

All what I want is just run an SQL command.

Thank you anyway.


Daniel said:
Help you in what way? You mean how can you supply the password in your
code? if so look at

http://groups.google.ca/group/micro...read/thread/3e847ea236aa4815/42bdffa21467982f

A brief extract from the post is below

Here is a bit of the code which works:
dbName is a variable containing the path and db name.


SQLString = "SELECT Min([Date ToR Agreed]) AS MinDate FROM BarChart Barchart
IN '" & dbName & "';"

Set db = OpenDatabase(dbName, False, False, "MS Access; pwd=ThePassword")
Set rs = db.OpenRecordset(SQLString)

If this isn't what you need as help, please explain what you need help with
exactly.
--
Hope this helps,

Daniel P








!pro-progammer:) said:
When I coding "DoCMD.RunSQL 'Select <some field> FROM <a table> IN <another
database>' " but that database is password protected, I always get "Not a
valid password" message.

Could anyone help me on this?

Thanks.
 

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