I'm using Access 2003 to develop an application where a user can dynamically generate a query, and then browse through a listbox with the results of their GUI defined query. I allow the column heads to show which counts as an extra row in the results.
The amount of rows returned is limited by the listbox's physical limit of 65535. I also have a list box showing Row X Of Y Selected in a textbox.
The message is generated each time the user clicks in the listbox, the code in the event handler is:
Me!txtRowCount.Value = "Row " & (Me!listDynamicSearchResult.ListIndex + 1) & _ " Of " & (Me!listDynamicSearchResult.ListCount - 1) & " Selected"
Usually the code shows Row X of 65534 Selected, since I opt out counting the header in the listbox. As the user gets closer to the maximum value, the Y value, 65534, changes to 65535 and stays at that max number until I requery or clear the form.
So, why does the listcount property not show the appropriate value until I am closer to the maximum value?