is there anyway you can help me optimize this code. the slow movement of rs is so visible that it take time to display the other row.
Code:Call opencon Set rsbookmark = New ADODB.Recordset If CLng(txtIDRef) > 0 Then rsbookmark.Open "tblsuppliers", conPC, adOpenKeyset, adLockReadOnly rsbookmark.Find "pk_supplierid =" & txtIDRef & "" 'find previous bookmark rsbookmark.MovePrevious 'chk if the next record= BOF If rsbookmark.BOF Then MsgBox strBOF, vbInformation, strprogname GoTo rs_skip End If txtrecpos = "Record " & rsbookmark.AbsolutePosition & " OF " & rsbookmark.RecordCount Call search_SC(rsbookmark!pk_supplierid) 'SP Call where pk_supplierid is clustered index End If rs_skip: If rsbookmark.State = adStateOpen Then rsbookmark.Close Set rsbookmark = Nothing Call closecon




Reply With Quote