ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Open current database method (https://www.excelbanter.com/excel-programming/311945-open-current-database-method.html)

No Name

Open current database method
 
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

JS[_5_]

Open current database method
 

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

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



cheers
Juan


-----Original Message-----
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
.


Jamie Collins

Open current database method
 
wrote ...

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.

--


All times are GMT +1. The time now is 05:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com