Hi
I am facing a problem with following code
Private Sub cmdMoveNext_Click()
rsChangeRequest.MoveNext
If rsChangeRequest.EOF Then
rsChangeRequest.MoveLast
End If
end sub
It gives a run time error -2147467259 (80004005) on rsChangeRequest.MoveNext
The whole process works like this
1. rsChangeRequest has a set of records using SQL - SELECT * FROM tbl_change_req_list LEFT JOIN tblAllClarity_Master on tbl_change_req_list.ClarityID = tblAllClarity_Master.Clarity WHERE Reviewed IS NULL ORDER BY CR_Number", using the ADODB connection.
2. After updating another table from rsChangeRequest, the record is deleted using docmd.runsql , the rsChangeRequest recordset is closed and opened again with the same SQL using ADODB.
3. When I click on "Next" button, the above set of vba is executed but I get the run time error.
The error description is : Object invalid or no longer set
I have not set the recordset to Nothing anywhere. Any idea what is causing this ? Are using ADODB and docmd.runsql creating any issue ?
I am facing a problem with following code
Private Sub cmdMoveNext_Click()
rsChangeRequest.MoveNext
If rsChangeRequest.EOF Then
rsChangeRequest.MoveLast
End If
end sub
It gives a run time error -2147467259 (80004005) on rsChangeRequest.MoveNext
The whole process works like this
1. rsChangeRequest has a set of records using SQL - SELECT * FROM tbl_change_req_list LEFT JOIN tblAllClarity_Master on tbl_change_req_list.ClarityID = tblAllClarity_Master.Clarity WHERE Reviewed IS NULL ORDER BY CR_Number", using the ADODB connection.
2. After updating another table from rsChangeRequest, the record is deleted using docmd.runsql , the rsChangeRequest recordset is closed and opened again with the same SQL using ADODB.
3. When I click on "Next" button, the above set of vba is executed but I get the run time error.
The error description is : Object invalid or no longer set
I have not set the recordset to Nothing anywhere. Any idea what is causing this ? Are using ADODB and docmd.runsql creating any issue ?
Last edited: