Hello all,
I am writing an app in VB6 interacting with an Access 2000 database.
I am trying to use the following lines of code but get a "Method 'Open' failed" error.
the query works in Access - giving the results I want.
I have made a connection, CN (used in this same routine, and not closed) to get another recordset successfully, so I know it is working.
'MID' - is a string, 'CurrentYr' is an integer
any thoughts would be much appreciated.
cheers
Phil
I am writing an app in VB6 interacting with an Access 2000 database.
I am trying to use the following lines of code but get a "Method 'Open' failed" error.
the query works in Access - giving the results I want.
I have made a connection, CN (used in this same routine, and not closed) to get another recordset successfully, so I know it is working.
'MID' - is a string, 'CurrentYr' is an integer
Code:
Set rs = New Recordset
strQry = "SELECT MID, MAX(CurrentYr) as Current FROM tblMembership GROUP BY MID "
rs.Open strQry, CN, adOpenStatic, adLockOptimistic, adCmdText
cheers
Phil