ImproveFormPerformance.mdb (intermediate) |
Post Reply |
Author | |
Roger Carlson
Microsoft MVP Joined: 20 Feb 2008 Status: Offline Points: 261 |
Post Options
Thanks(0)
Posted: 01 Aug 2008 at 2:57am |
Please consider donating $1 per sample downloaded, find out why here.
ImproveFormPerformance.mdb One way to improve the performance of a form that is bound to a LARGE dataset is to split the data into smaller chunks. This form uses the "Phonebook" method to do that. The idea comes from those flip-phone indexes. Click one of the 27 buttons at the top and the form will show you only those records in the table that start with the corresponding letter.
The default Record Source in this case is just those records which start with "A". I could have chosen to start at the New Record or All Records. All Records wouldn't be very smart, since we are trying to limit records. When a button is clicked, several things happen. 1) an invisible textbox receives the letter that corresponds to the button pushed, 2) the listbox is requeried, and then the Record Source for the form is limited to just those letters by setting the Record Source property to the SQL statement at the bottom of the option group OnClick property. There is also code in the OnClick property of the Listbox that allows you to navigate between records within that letter grouping. Lastly, the code in the OnCurrent property of the form keeps the Listbox in sync with the current record when you use the Navigation Buttons of the form. Download |
|
|
|
Sponsored Links | Want a good read? Try The Summer of His Life (available on Amazon!) |
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |