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

ID: Q187342


The information in this article applies to:
  • Microsoft Access versions 2.0, 7.0, 97


SYMPTOMS

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

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.


MORE INFORMATION

Steps to Reproduce Behavior


  1. Open the sample database Northwind.mdb (or Nwind.mdb in version 2.0).


  2. Create a module and type the following line in the Declarations section if it is not already there:
    
          Option Explicit 


  3. 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 


  4. To run this procedure, type the following line in the Debug window, and then press ENTER.
    
          FillTable 

    When the procedure is finished, you will receive a message indicating that the table was created.


  5. Open a new form in Design view, and add a combo box to the form.


  6. Set the RowSource property of the combo box to "LargeTable."


  7. Open the form in Form view.


  8. Type 65536 in the combo box.


  9. Click the arrow next to the combo box to view the list.

    Note that 65536 is the last visible row in the combo box.


Additional query words: missing not all there truncated

Keywords : FmsCmbo
Version : WINDOWS:2.0,7.0,97
Platform : WINDOWS
Issue type : kbprb


Last Reviewed: April 28, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.