方法一
复制代码 代码如下:
' HTMer_RecordCount为要计算的页面总数
' HTMer_RecordCount为记录集数
' HTMer_PageSize为每页记录数
If HTMer_RecordCount Mod HTMer_PageSize=0 Then
HTMer_PageCount=Int(HTMer_RecordCount/HTMer_PageSize)
Else
HTMer_PageCount=Int(HTMer_RecordCount/HTMer_PageSize)+1
End If
方法二
复制代码 代码如下:
' HTMer_RecordCount为要计算的页面总数
' HTMer_RecordCount为记录集数
' HTMer_PageSize为每页记录数
HTMer_PageCount=Int(HTMer_RecordCount/HTMer_PageSize*-1)*-1
方法三
复制代码 代码如下:
' HTMer_RecordCount为要计算的页面总数
' HTMer_RecordCount为记录集数
' HTMer_PageSize为每页记录数
HTMer_PageCount=Abs(Int(-(HTMer_RecordCount/HTMer_PageSize)))
方法四
复制代码 代码如下:
' HTMer_RecordCount为要计算的页面总数
' HTMer_RecordCount为记录集数
' HTMer_PageSize为每页记录数
HTMer_PageCount=Fix(HTMer_RecordCount/HTMer_PageSize)-CInt(CBool(HTMer_RecordCount Mod HTMer_PageSize))