Article ID: 112747
Article Last Modified on 1/18/2007
APPLIES TO
- Microsoft Access 2.0 Standard Edition
- Microsoft Access 95 Standard Edition
- Microsoft Access 97 Standard Edition
This article was previously published under Q112747
Moderate: Requires basic macro, coding, and interoperability skills.
SUMMARY
This article lists several things that you can do to improve the speed and performance of your subforms.
MORE INFORMATION
To improve subform performance, try these tips:
- If you can, base your subforms on queries rather than tables. Include only fields from the record source that are absolutely necessary. Extra fields can decrease subform performance.
- Index all the fields on the subform that are linked to the main form. Indexes help speed the search process to find the matching subform records.
- Index any fields used for criteria (such as when a subform is based on a criteria query).
If you are linking on multiple fields, add a calculated field to the main form that concatenates the fields. Then, create a calculated column in the subform's RecordSource property query with the same expression. For example, to link to the subform on an Employee ID field and an Order ID field, add a text box to the main form with the following properties:
Name: EmployeeIDOrderID ControlSource: =[EmployeeID] & [OrderID] NOTE: In Microsoft Access version 2.0, there is a space in the [Employee ID] and [Order ID] fields.
Next, add the following field to the query that the subform is based on:
EmployeeIDOrderID: [Employee ID] & [Order ID]
Then, link the main form and the subform on the concatenated field rather than on the two individual fields. The subform properties might look as follows:
LinkChildFields: EmployeeIDOrderID LinkMasterFields: EmployeeIDOrderID
Because Microsoft Access only has to compare one criteria to return the subform's recordset, the subform's performance should improve.
- Set the subform's DefaultEditing property to Read-Only if the records in the subform are not going to be edited.
- If your subform is a continuous form and contains combo boxes, explicitly justify the combo box in the subform's form Design view. This prevents Microsoft Access from determining the proper justification of the combo box values for each record and thus speeds the display of subform records which have combo boxes.
REFERENCES
For more information about general performance and indexing recommendations, search the Help Index for "Performance Analyzer," or ask the Microsoft Access 97 Office Assistant.
Additional query words: speeding slow optimize
Keywords: kbinfo kbusage KB112747