Dim strSQL As String
    Dim cnn As New ADODB.Connection
    Dim rs As New ADODB.Recordset
    rs.LockType = adLockOptimistic
    rs.CursorType = adOpenKeyset
    cnn.CursorLocation = adUseClient
    ConnectionString = connstr
    cnn.Open ConnectionString
    rs.Open "SELECT * FROM 学生录用信息表 where 签约合同号='" & txtHTID.Text & "'", cnn
    If rs.EOF = False Then
     rs.MoveNext
    Else
      MsgBox "没有您要的记录!", vbOKOnly + vbInformation, "注意"
    End If
    rs.Close
    Set cnn = Nothing
上面是我实现移动的代码   可是不能实现移动   请高手指教。谢谢

解决方案 »

  1.   

        Dim strSQL As String 
        Dim cnn As New ADODB.Connection 
        Dim rs As New ADODB.Recordset 
        rs.LockType = adLockOptimistic 
        rs.CursorType = adOpenKeyset 
        cnn.CursorLocation = adUseClient 
        ConnectionString = connstr 
        cnn.Open ConnectionString 
        rs.Open "SELECT * FROM 学生录用信息表 where 签约合同号='" & txtHTID.Text & "'", cnn 
        If rs.EOF = False Then 
         rs.MoveNext 
         txtBZhu.Text = rs.Fields("备注")
        Else 
          MsgBox "没有您要的记录!", vbOKOnly + vbInformation, "注意" 
        End If 
        rs.Close 
        Set cnn = Nothing 
    上面是我实现移动的代码   可是不能实现移动   请高手指教。谢谢
      

  2.   

        If Not rs.EOF Then 
         rs.MoveNext 
        Else 
          MsgBox "没有您要的记录!", vbOKOnly + vbInformation, "注意" 
        End If