主题:如何查看结果集
有两个按钮:“前笔”和“后笔”,如何实现点前笔按钮记录向前移动,点后笔按钮记录向后移动?下面是我的代码,总是在移动到结果集头和尾的地方出错。请大家帮我看看,谢谢!
Private Sub RsPre()
If Not RsSrchPK.BOF Then
RsSrchPK.MovePrevious
With FG
For i = 1 To 12
.Row = 1
.Col = i
.Text = RsSrchPK.Fields(i)
Next
End With
End If
End Sub
Private Sub RsNext()
If Not RsSrchPK.EOF Then
RsSrchPK.MoveNext
With FG
For i = 1 To 12
.Row = 1
.Col = i
.Text = RsSrchPK.Fields(i)
Next
End With
End If
End Sub
Private Sub RsPre()
If Not RsSrchPK.BOF Then
RsSrchPK.MovePrevious
With FG
For i = 1 To 12
.Row = 1
.Col = i
.Text = RsSrchPK.Fields(i)
Next
End With
End If
End Sub
Private Sub RsNext()
If Not RsSrchPK.EOF Then
RsSrchPK.MoveNext
With FG
For i = 1 To 12
.Row = 1
.Col = i
.Text = RsSrchPK.Fields(i)
Next
End With
End If
End Sub