Designing Forms and Reports to Improve Performance
You can do several things to forms and reports to improve your application's performance. These include techniques to quickly load the forms and reports, tips and tricks regarding OLE objects, and special coding techniques that apply only to forms and reports.
Designing Forms
Because forms are your main interface to your user, making them as efficient as possible can go a long way toward improving the user's perception of your application's performance. Additionally, many of the form techniques are extremely easy to implement.Chapter 9, "Advanced Form Techniques."Finally, eliminate the code module from forms that don't need it. A form without a code module loads more quickly and occupies less disk space. You can still call function procedures from an event property using an expression, or you can navigate about your application from the form using hyperlinks. You can remove the module associated with a form by setting the HasModule property to No.
Designing Reports
Many of the report-optimization techniques are the same as the form-optimization techniques. Reducing the number of controls, avoiding overlapping controls, basing reports on queries, avoiding OLE objects, and converting unbound object frames that display graphics to image controls are all techniques that improve the performance of reports as well as forms.You can use a few additional techniques to specifically improve the performance of reports. Eliminate any unnecessary sorting and grouping expressions, and index all fields on which you sort or group. Base subreports on queries rather than on tables, and include only necessary fields in the queries. Make sure that the queries underlying the report are optimized and that you index all fields in the subreport that are linked to the main report.A special technique that you can use to improve the performance of reports involves the No Data event and the HasData property. The No Data event is fired when a report is opened, and no data is returned by the record source of the report. The HasData property is used to determine whether a report is bound to an empty recordset. If the HasData property of a subreport is False, you can hide the subreport, thereby improving performance.