Microsoft KB Archive/187342

= ACC: Combo Boxes Limited to 65536 (64K) Rows =

Article ID: 187342

Article Last Modified on 1/23/2007

-

APPLIES TO


 * Microsoft Access 2.0 Standard Edition
 * Microsoft Access 95 Standard Edition
 * Microsoft Access 97 Standard Edition

-



This article was previously published under Q187342



Novice: Requires knowledge of the user interface on single-user computers.



SYMPTOMS
When you view the list portion of a combo box or list box that is based on a table or query with more than 65536 records, you see only the first 65536 rows.



CAUSE
Microsoft Access limits the number of rows displayed in a combo box or list box to 65536 rows.



RESOLUTION
Use a query to restrict the number of rows the combo box or list box is displaying to no more than 65536.



STATUS
This behavior is by design.



Steps to Reproduce Behavior
 Open the sample database Northwind.mdb (or Nwind.mdb in version 2.0).  Create a module and type the following line in the Declarations section if it is not already there:

     Option Explicit   Type the following procedure:

Sub FillTable ' Creates a table that contains ' 70,000 records.

Dim db As Database Dim tbl As TableDef Dim fld As Field Dim rs As Recordset Dim lng As Long

Set db = CurrentDb Set tbl = db.CreateTableDef tbl.Name = "LargeTable" Set fld = tbl.CreateField("Field1", dbLong) tbl.Fields.Append fld db.TableDefs.Append tbl Set rs = tbl.OpenRecordset(dbOpenDynaset) For lng = 1 To 70000 rs.AddNew rs!Field1 = lng rs.Update Next rs.Close MsgBox "Table Created" End Sub   To run this procedure, type the following line in the Debug window, and then press ENTER.

<pre class="fixed_text">     FillTable

When the procedure is finished, you will receive a message indicating that the table was created. </li> Open a new form in Design view, and add a combo box to the form.</li> Set the RowSource property of the combo box to "LargeTable."</li> Open the form in Form view.</li> Type 65536 in the combo box.</li> Click the arrow next to the combo box to view the list.

Note that 65536 is the last visible row in the combo box.</li></ol>

Additional query words: missing not all there truncated maximum upper limit incomplete comes up short don't do show

Keywords: kbprb KB187342

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.