Hi
Why don't you try something different: evaluate the number of records instead of identifying if ou are at the beginning or at the end of the recordset.
another thing is that the recordst will start at the beginning, so if the first action is move to the previous record, you will get an error.
If there are records, then move to the previous one, but make sure you go to the last one first.
'Open connection
ConnCust = New ADODB.Connection
Cust_String = "Provider=Microsoft.JET.OLEDB.4.0;data source=\\AAA\ABC.mdb"
ConnCust.Open(Cust_String)
'Open recordset from Customer List
RstCust = New ADODB.Recordset
Last_SQL = "SELECT * FROM CustomerList WHERE CustomerID <= " & lblCustID.Text & " ORDER BY CustomerID"
RstCust = ConnCust.Execute(Last_SQL)
With RstCust
if RstCust.RecordCount = 0 then
.Close()
ConnCust.Close()
'load first record
Call Load_First_Saved_Record()
Exit Sub
end if
If RstCust("CustomerID").Value = lblCustID.Text Then
if not .BOF
.Movelast()
.MovePrevious()
else
MsgBox("Begining of record list!", vbExclamation, "Customer Entry Record")
End If
End If
Call Retrieve_Data()
end if
end with
i think that will do it.
regards