昨天刚试de,拿出来大家参考一下,如果有错谢谢大家给提出来!!!
Function breakepage(pagesize As Integer, biaoji As String)
Static Currentpage
Dim pagecount
Dim adoadd As New ADODB.Command
adoadd.ActiveConnection = Con
adoadd.CommandType = adCmdText
adoadd.CommandText = "select * from daoru where kdbj=0 and kuwei='xg' order by xuhao "
Set rsbd = adoadd.Execute
If rsbd.EOF Or rsbd.BOF Then
Label25.Caption = "共有0条记录"
Label37.Caption = "共0页"
Label26.Caption = "当前是第0页 "
MSHFlexGrid4.Rows = 1
Exit Function
End If
rsbd.pagesize = pagesize
MSHFlexGrid4.Rows = pagesize+1
Select Case biaoji
Case "first":
Currentpage = 1
Case "pre":
Currentpage = Currentpage - 1
If Currentpage &l