Results 1 to 2 of 2
2016-05-02, 11:35 #1
- Join Date
- Dec 2002
- Bruges, Belgium
- Thanked 2 Times in 2 Posts
Opening an Encrypted Access Database in VBA
Access data base created with access 2010, encrypted and opened in access 2016
Following code is used (in EXCEL) to open the data base:
Dim strProvider As String strProvider = "Microsoft.ACE.OLEDB.12.0" Dim strCon As String strCon = "Provider = " & strProvider & ";" & _ "Data source = " & strDBFullName & ";" & _ "Jet OLEDB:Database Password = '" & strDBCode & "';" Dim conDB As ADODB.Connection Set conDB = New ADODB.Connection With conDB .ConnectionString = strCon .CursorLocation = adUseClient .Open End With
The program gets stuck at the Open statement with following error message:
The connection string is:
?strcon Provider = Microsoft.ACE.OLEDB.12.0;Data source = Y:\GRXXX\GRXXX.accdb;Jet OLEDB:Database Password = ' ****** ********** ****';
2016-05-02, 11:41 #2
- Join Date
- Mar 2004
- Manning, South Carolina
- Thanked 1,480 Times in 1,346 Posts
It appears to me to be a non-standard circular reference!
That is, Access calling Excel calling back to the same Access Database.
There is no good reason IMHO to do this. You can easily write code inside Access to open and control Excel thus eliminating this dog chasing his own tail scenario.