Hi all,
I've been developing with Access2000 and I'm asked to change to Access97. The entire database seems fine after conversion except for one portion of the code.
The code is as follows:
<code>
Dim rs As New ADODB.RecordSet
rs.Open "SELECT * FROM tblSomething", CurrentProject.Connection, <some other params>
</code>
I've read that it can't be done that way so I changed it to:
<code>
Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Set cn = CurrentProject.Connection
rs.Open "SELECT * FROM tblSomething", cn, <some other params>
</code>
The problem still persists since Access97 can't seem to find the CurrentProject reference. Is there a way to go about this?
Any help is appreciated.
Thank you in advance.
I've been developing with Access2000 and I'm asked to change to Access97. The entire database seems fine after conversion except for one portion of the code.
The code is as follows:
<code>
Dim rs As New ADODB.RecordSet
rs.Open "SELECT * FROM tblSomething", CurrentProject.Connection, <some other params>
</code>
I've read that it can't be done that way so I changed it to:
<code>
Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Set cn = CurrentProject.Connection
rs.Open "SELECT * FROM tblSomething", cn, <some other params>
</code>
The problem still persists since Access97 can't seem to find the CurrentProject reference. Is there a way to go about this?
Any help is appreciated.
Thank you in advance.