Private Function ChangeRstPage(frm As Form, rst As DAO.Recordset, sFldID As String, iPageRecCount As Integer, iCurrentPage As Integer)
' 将按页码筛选后的记录集作为窗体记录集
Dim iStartNumber As Integer
Dim lngStartID As Long
Dim lngLastID As Long
iStartNumber = (iCurrentPage - 1) * iPageRecCount
With rst
If .RecordCount > 0 Then
.MoveFirst
.Move iStartNumber
If .EOF Then Exit Function
lngStartID = .Fields(sFldID)
.Move iPageRecCount - 1
If .EOF Then .MoveLast
lngLastID = .Fields(sFldID)
.Filter = sFldID & " Between " & lngStartID & " And " & lngLastID
End If
Set frm.Recordset = .OpenRecordset
End With