分页显示数据记录的例子如先显示前20条,再显示后20条(50分)

wenejiang 2003-02-10 03:59:50
分页显示数据记录的例子(源码)如先显示前20条,再显示后20条(50分)
...全文
144 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
PageSize=20
maskzha 2003-02-12
  • 打赏
  • 举报
回复
This example displays the next page in a multipage file, and determines whether there is another page to display.

Private Sub cmdNextPage_Click()
Dim lngNewPg As Long

lngNewPg = ImgEdit1.Page + 1
'Determine if there is a next page to be displayed
'by finding out the number of pages in the file
If lngNewPg > ImgEdit1.PageCount Then
MsgBox "Page Number is out of range"
'Don't set page property
Exit Sub
End If

ImgEdit1.Page = lngNewPg
ImgEdit1.Display
End Sub
MoQi_123 2003-02-12
  • 打赏
  • 举报
回复
Dim intTop as Intege
Dim strSQL as String

intTop=0
'第一次查询前20条
strSQL="Select Top 20 From YOurTable order by ID"

'查询后面的20条记录
intTop=intTop + 20
strSQL="Select Top 20 From YourTable Where ID not in (Select Top " & intTop & " From YourTable order by ID"
wenejiang 2003-02-11
  • 打赏
  • 举报
回复
我如果检索到1万条记录,我先显示前200条,然后再滚动显示
我该用什么样的游标类型,和游标位置
wenejiang 2003-02-11
  • 打赏
  • 举报
回复
我想要源码!!!我的email是wenejiang@hotmail.com
Cooly 2003-02-10
  • 打赏
  • 举报
回复
用PageSize.

PageSize=20

1,216

社区成员

发帖
与我相关
我的任务
社区描述
VB 数据库(包含打印,安装,报表)
社区管理员
  • 数据库(包含打印,安装,报表)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧