Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Ricky Johnson   on Nov 13 In MS Office Category.

  
Question Answered By: Erma Henry   on Nov 13

Every time you try to process tens of thousands of records in VBA, you are
going to be really slow.

I would suggest thinking about doing the drill-down without actually
retrieving the data, just indications of the number of records that the
filter would select if you tried to use it.

I'd need to have a play to work out the right SQL, but you're probably
talking about Count() clauses in the SQL coupled to either "select distinct"
or "group by" clauses.

Once the user has filtered down enough that the result set is manageable,
you can then do an automatic select of the actual data. You could easily
also allow the user to force the select on "unmanageable" quantities,
although a sanity check would be appropriate to stop the user selecting too
much. E.g. automatic if <=100 records, manual allowed if <=1000 records.

Remember also that the administrators of the database (I assume it's a
corporate one) are not going to take kindly to selects that return tens of
thousands of records.

Share: 

 

This Question has 19 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Populate Listbox Column Headings Or get search suggestion and latest updates.


Tagged: