[thelist] Only display first 100 records from access

Howard Cheng howcheng at ix.netcom.com
Thu Jan 17 11:40:56 CST 2002


You don't need recordset paging per se. The following code works with SQL 
Server, but I'll assume it's good for Access too.

szSQL = "SELECT ... FROM ... ORDER BY ..."
oRS.MaxRecords = 200
oRS.Open szSQL, oConn, adOpenStatic, , adCmdText
oRS.Move 100

While Not oRS.EOF
     ...
Wend

At 11:43 AM 1/17/2002 -0500, Chris Blessing wrote:
>I don't think you can do that with Access... I know you can't with SQL
>Server (oddly MySQL offers the LIMIT clause).  You have to use RecordSet
>paging (rudy helped me out with this a while back).  Check out this great
>(as always) article on 4gfr:

::::::::::::::::::::::
Howard Cheng
howcheng at ix.netcom.com
AIM: bennyphoebe
ICQ: 47319315





More information about the thelist mailing list