You appear to be missing delimiters between some of the arguments (before
User ID and before Data Source)
If that doesn't solve the problem, try using the connection string Carl
Prothman has at
http://www.carlprothman.net/Default.aspx?tabid=87#OLEDBProviderForMicrosoftJet
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
"Mike" wrote in message
Ok so heres the code.. for some reason I kept getting the no
permissions message, so I attempted to add the access workgroup file.
Now I
get the "Authentication Failed" message. This is a secure database.
HELP.. I know I'm writing (adding) something wrong... The user i'm
using is a valid user in the workgroup associated with the DB.
THanks
CODE FOLLOWS.
Private Function CallJetDB(strMDB As String) As Boolean
Dim SecFile As String
Dim creaobj As Object
SecFile = DLookup("VCIRSecfile", "tbldbpaths")
Set creaobj = CreateObject("ADODB.Connection")
With creaobj
.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Jet
OLEDB:System Database=" & SecFile & "User ID=Viewer;Password=12345" _
& "Data Source=" & strMDB & "; Mode=Share Deny None;"
.Open
CallJetDB = (cnn.Properties("Jet OLEDB:Engine Type") = 5)
End With
ExitHere:
creaobj.Close
Set creaobj = Nothing
Exit Function
End With
End Function