ListBox Question

SoxPats83

Registered User.
Local time
Today, 07:54
Joined
May 7, 2010
Messages
196
I have a listbox on one of my forms what thats function is to search. theres tons of records loaded into this list box and there a text box nearby and when something is typed into it the list box dynamically search for matching values. very neat (got from a sample DB somewhere within these boards). there is also a disabled locked text box nearby that keeps a running total of how many records there are in the list box during the search, that number changes with the more you type as the more you type the more narrow your search is becoming. all of my records in this list box have a value to them. what i am looking for is a similar text box to the on that counts the records, with a running value counter. the control source for the total records text box is as follows:
=ListBox.ListCount-1

i have tried ListSum and other "bright" ideas, but no luck. anyone got any ideas?
 
There is no similar function to the .ListCount to do what you want. You will need to figure out another method of doing what you want.

One that springs to mind, is to use a Group By query that calculates the total you want, and feed that result into the text box.
 
Just as an aside the reason the code is; =ListBox.ListCount-1. Is because the Header in the List box gets counted as a record when you have a header row on the list box. If there was no header it would simply be; =ListBox.ListCount
 

Users who are viewing this thread

Back
Top Bottom