yeah, the pop up, followed by a new form displaying all the results
works best. loading 25K people in a combobox is a bitch, because it's
an O(n) operation, which means, that the more people in the database
you have the more you'll have to wait for the combobox to load
Plenty of solutions. here's one off the top of my head:
make sure you always set the .Sort property, so the server can return
your data sorted. <--- important
do a small statistical analists of the last names of the poeple in your
database and find out the distribution of the first letter of the last
name of each employee (i assume they are employees). Create views that
group employees according to the first letter of the last name, eg,
[A-D], [E-F] and so on, and so on. You may also create sub-views on
the above views, that include the first and the second letter of each
employee (see later on in the reply). Ask the user for the name of the
employee, get the first/second letter of their last name and search
each view/subview, accordingly.
Worst search time: O(log(n, n)) logn with subscript n, where n is the
number of groups you create. this is orders of magnitude faster than
O(n) (linear searching), which is what you do when you load the combo
box.
this is basically how binary search works.
http://en.wikipedia.org/wiki/Binary_search
now, why you want to find the normal distribution: because you might
have a portion of the employees that their last name starts with the
later J for example. if that portion is like 10-20% of your workforce,
it will take you more to search that portion of employees, since after
the first grouping, you're back loading/searcing your data lineary, so,
the guy that signs the checks will be not happy. If you create
subsets(subview s) of that portion(s) of employess that are larger
(percentagewise ) - i'd say more than 6%-, you will always have will
always have very fast loading times. (well, unless your workforce
increases by a 10th fold, where you'll have to use some other search
technique
You might wanna code the analysis into a module, so you can use it at a
later time. (you will use it, again)
Now, all together, let's say "Thank you Dr. Knuth!"
George Marselis