Roger's Access Library Homepage
Forum Home Forum Home > Roger's Access Library > Roger's Download Samples
  New Posts New Posts RSS Feed - ImproveFormPerformance.mdb (intermediate)
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Please consider donating $1 per sample downloaded, (find out why here)

ImproveFormPerformance.mdb (intermediate)

 Post Reply Post Reply
Roger Carlson View Drop Down
Microsoft MVP
Microsoft MVP

Joined: 20 Feb 2008
Status: Offline
Points: 261
Post Options Post Options   Thanks (0) Thanks(0)   Quote Roger Carlson Quote  Post ReplyReply Direct Link To This Post Topic: ImproveFormPerformance.mdb (intermediate)
    Posted: 01 Aug 2008 at 2:57am

Please consider donating $1 per sample downloaded, find out why here.


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.

Access 2000 (50 KB):

Consider donating $1 per sample downloaded, find out why here.<
Back to Top
Sponsored Links

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.03
Copyright ©2001-2019 Web Wiz Ltd.