INCREASING THE PERFORMANCE OF YOUR FORMS

Although the Access team has worked on performance of forms throughout past and current versions, there are still ways to increase performance even more on forms, using ingenuity and VBA.

Note

Some ideas discussed in this chapter will actually increase performance in the user's perception, which most of the time is as important as really gaining in performance.


How to Increase Form Performance

You can do some things to increase your performance regarding forms:

  • If there is no CBF (code behind forms), you can specify the form as being a lightweight form by changing the HasModule property to No. The HasModule property can be found on the Other page of the form's property sheet. This property changes automatically from No to Yes when you create event procedures.

  • Don't place code in the OnOpen or OnLoad events if you can help it. That way, VBA won't load at the time and you'll get better performance.

  • When using datasheets in subforms, have the initial record source display zero records. That way, you don't have the populating time at load time of the form.

  • Better yet, if you have a multipage tab form, and the page with the datasheet is on a tab that's not used every time, set the subform control's SourceObject at runtime. You can do this in the Tab control's OnChange event, and then just do it when the value of the Tab control equals the page with the subform control on it.

  • Use dLookup() functions and other domain functions sparingly.

  • Combo boxes, although giving better performance than previous versions, still take time. Be careful of how many you have on the form.

  • Make sure that you compile and save all modules before you distribute your application.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.216.49.54