cravincreeks
Technical User
Hello all,
I'm attempting to create a VBA macro within a Microsoft Access .mdb file that is launched by clicking a button on a form. We'd like to use ADO because this database may one day be ported to a RDBMS - planning for the future. Anyhow, I'm attempting to open a recordset using the following code
But when my program enters the sub that contains those lines of code, the debugger highlights the 'CurrentProject.Connection' argument and a messagebox appears stating "Error in loading DLL"
I've tried setting a reference to the 'Microsoft ActiveX Data Objects 2.1' and 2.7. I have browsed to the location where these files are reported to be located and they are present (e.g. C:\Program Files\Common Files\System\ADO\msado21.tbl).
I've succesfully used ADO on the same machine while writing a VBA macro within another software package.
Any idea what the problem could be? I've searched the web and apparently others have encountered this problem, as similar posts can be found on several discussion forums. Unfortunately, nobody could offer a solution.
We do have the option of upgrading this version of MS Access 2002 to Access 2003...if that might help....
AZ
I'm attempting to create a VBA macro within a Microsoft Access .mdb file that is launched by clicking a button on a form. We'd like to use ADO because this database may one day be ported to a RDBMS - planning for the future. Anyhow, I'm attempting to open a recordset using the following code
Code:
Dim rsShpPath As New ADODB.RecordSet, strSQL As String
strSQL = "SELECT tAugust2004.CASENUM, tAugust2004.SHAPEPATH FROM tAugust2004;"
rsShpPath.Open strSQL, CurrentProject.Connection, adOpenStatic, adLockOptimistic
I've tried setting a reference to the 'Microsoft ActiveX Data Objects 2.1' and 2.7. I have browsed to the location where these files are reported to be located and they are present (e.g. C:\Program Files\Common Files\System\ADO\msado21.tbl).
I've succesfully used ADO on the same machine while writing a VBA macro within another software package.
Any idea what the problem could be? I've searched the web and apparently others have encountered this problem, as similar posts can be found on several discussion forums. Unfortunately, nobody could offer a solution.
We do have the option of upgrading this version of MS Access 2002 to Access 2003...if that might help....
AZ