Open current database method

G

Guest

Can anyone tell me why this code is not working I have the
correct information need to support opening the access
database, but this one line keeps failing.

I have never used the Exclusive or the Password part of
this code. How can I do this correctly.

Thank You

dba.OpenCurrentDatabase filepath:=stgPath,[Exclusive =
false], bstrPassword = test
 
J

JS

unless test is a variable that contains the string value
of the password, test shuld be "test"
 
J

Jamie Collins

dba.OpenCurrentDatabase filepath:=stgPath,[Exclusive =
false], bstrPassword = test

Just a guess but you may want:

dba.OpenCurrentDatabase _
filepath:=stgPath, _
Exclusive:= False, _
bstrPassword:= "test"

Or briefer:

dba.OpenCurrentDatabase stgPath, False, "test"

If test is a variable, omit the quotes.

Jamie.

--
 

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