Steps to Reproduce Behavior
Use the following Microsoft Visual Basic code to reproduce this problem. Make sure that Microsoft ActiveX Data Objects is selected in the
Project ... References dialog box. This code connects to a SQL Server database.
Private Sub cmdTestIt_Click()
Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim txtID As String
cn.ConnectionString = "provider=sqloledb;data source=YourSQLServer;initial catalog=northwind;User ID=YourUserID;Password=YourPassword"
' Uncomment the line below to correct the problem
' cn.CursorLocation = adUseClient
cn.Open
Set rs = cn.Execute("SELECT * FROM Customers")
rs.Find "CustomerID='" & rs!CustomerID & "'"
Debug.Print rs.EOF
rs.Close
cn.Close
End Sub