Kim Wiggins
kimjwiggins at yahoo.com
Sun Dec 18 23:14:29 CST 2005
Can anyone possibly tell me why my MovePrevious and MoveNext buttons in my Access db does not move one record at a time when I am using it on a large dataset? When I use it on a large dataset of 200 or more records the MovePrevious will move back 3 records and then if you select MoveNext it will move ahead 5 records. Any dataset with less than 200 records it works fine. I will query on the workorder number in the table and then the workorder is divided even further into card numbers. For example: WO 156 has 400 card records. I then perform a search for the workorder - card number that I want and then from there I use the move previous or move next button. Here is my code for move previous: Thanks Kim On Error GoTo SubErr Dim i As Integer Dim rs As ADODB.Recordset Set oConn = New ADODB.Connection oConn.Open frmSplash.sConn strSQL = "select * from tblAircraftWO where work_order_no = " & txtWorkOrderNo.Text Set rs = New ADODB.Recordset rs.Open strSQL, oConn, adOpenKeyset, adLockOptimistic rs.AbsolutePosition = txtCardNo.Text rs.MovePrevious If Not rs.BOF Then......... //the rest of this code is to display the record in the interface If rs.BOF Then rs.MoveFirst MsgBox "You are at the beginning." End If __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com