esipp said:
BRILLIANT! THANK YOU!
I have a general question: since my application is getting bulky and SLOW... how does this coding affect its speed? What causes an application to slow down the most?
Well I have used other methods to select records on subforms, including checkboxes, and this one seems require the least amount of processing power.
There are many threads here about how to increase performance on a DB, most of them are just personal preferences, but there are some that are a must:
1. Split the Db, front end /back end
2. Back end on File server, Front end on Client's PCs
3. Compact and repair frequently, DBs bloat and defragment just like Hard drives, (look for a way to Autocompact a database on selected criteria in the forum. Keyword: Autocompact)
4. Clean your code, think how to make it more efficient, use stored queries instead of SQL in the processess that are performed by several users at the same time, they are faster. Avoid Dlookups, Dim all variables/ Close and Clean all open recordsets. Even though it is against most rules, I take all comments on the code on the Db that I release, those comments are read by the computer everytime a procedure is done. Not all code has to be commented - see point 5.
5. Debug and Compact your code, even more, create an MDE, that will keep all the code compacted. No user/developer will be able to access the code from there, why have it commented?
6. This is a big one: Keep all tables that dont change (lookup tables)Local on the Front end, or better, on another local Db and link them to your Front End Db.
7. Check your queries, pull Just the data you need, nothing more, nothing else. All that info has to travel through the Network every time you open a form/report etc.
8. Consider archiving, that is moving old/Unsued Records, to another Db, you can design ways for them to access that info in case they need it.