时间:2021-07-01 10:21:17 帮助过:45人阅读
' 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))