Print Page | Close Window

ImproveFormPerformance.mdb (intermediate)

Printed From: Roger's Access Library
Category: Roger's Access Library
Forum Name: Roger's Download Samples
Forum Description: A compendium of Microsoft Access 97 and 2000+ routines, each separated into its own sample database.
URL: www.rogersaccesslibrary.com/forum/forum_posts.asp?TID=337
Printed Date: 28 Mar 2024 at 5:13am
Software Version: Web Wiz Forums 12.03 - http://www.webwizforums.com


Topic: ImproveFormPerformance.mdb (intermediate)
Posted By: Roger Carlson
Subject: ImproveFormPerformance.mdb (intermediate)
Date Posted: 01 Aug 2008 at 2:57am

Please consider donating $1 per sample downloaded, http://www.rogersaccesslibrary.com/whydonations.htm - 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
Access 2000 (50 KB):
http://www.rogersaccesslibrary.com/forum/uploads/5/ImproveFormPerformance2k.zip - uploads/5/ImproveFormPerformance2k.zip



-------------
Consider donating $1 per sample downloaded, http://www.rogersaccesslibrary.com/whydonations.htm" rel="nofollow - find out why here .<



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.03 - http://www.webwizforums.com
Copyright ©2001-2019 Web Wiz Ltd. - https://www.webwiz.net