How to speed up database access
Here is a trick to loop through a recordset faster. Often when looping through a recordset people will use the following code:
Do While Not Records.EOF
Combo1.AddItem Records![Full Name]
Eecords.Movenext
LoopThe problem is that everytime the database moves to the next record it must make a check to see if it has reached the end of the file. This slows the looping down a great deal. When moving or searching throuch a large record set this can make a major difference. Here is a better way to do it.
Records.MoveLast
intRecCount=Records.RecordCount
Records.MoveFirst
For intCounter=1 To intRecCount
Combo1.AddItem Records![Full Name]
Records.MoveNext
Next intCounterYou should see about a 33% speed increase.本U R L:http://www.qqread.com/access/s275752.html
相关图文阅读
频道图文推荐
健 康 咨 询
时 尚 咨 询
相关专题
- ACCESS入门教程(一)初识Access 200 (53439次浏览)
- ACCESS入门教程(二)窗口接口使用简介 (29045次浏览)
- ACCESS入门教程(三)用向导建立数据库 (25665次浏览)
- ACCESS入门教程(九)建立简单的查询 (21179次浏览)
- ACCESS入门教程(十一)如何建立数据窗体 (14937次浏览)
- ACCESS入门教程(六)在表中输入数据 (14445次浏览)
- ACCESS入门教程(十)为查询制定规则 (13204次浏览)
- ACCESS入门教程(五)用表向导建立表 (11480次浏览)
- 中文Access2000速成教程--1.2使用“数据库向 (597次浏览)
- 用Access设计客观试卷(一) (382次浏览)



