Hi,
I want to get the Provider as a string to CurrentProject for later use.
In one database I get following string "Microsoft.ACE.OLEDB.12.0". From another database I get an error message (I have marked the command where error occurs beneath):
I have been looking in File -> Options -> Current Database for different settings. I can't find anything. Anyone know what I shall do?
Code:
Public Sub MyProvider()
Dim adConn As ADODB.Connection
Set adConn = New ADODB.Connection
adConn.Open CurrentProject.Connection 'This command creates an error from one database. Works fine in another.
Debug.Print adConn.Provider
adConn.Close
Set adConn = Nothing
End Sub