ADO - CurrentProject.AccessConnection
I am trying to use ADO to connect to a local database. I had it working earlier using the following line of code:
Set localConnection = CurrentProject.AccessConnection
But now when I am using this same code for a different database, VBA says that CurrentProject doesn't recognize this property for CurrentProject. Does anybody have any idea why VBA would start being so stubborn?
localConnection is my connection variable
I have it declared as follows:
Dim localConnection As New ADODB.Connection