FMS Home FMS Software Development Team Blog FMS Facebook Page FMS Twitter
Jump: Search:

Microsoft Access Developer Center

Table Design

Query Design

Form Design

Form Tips and Mistakes

Form Navigation Caption

Using a RecordsetClone

Synchronize Two Subforms

Multiple OpenArgs Values

Late Bind Tab Subforms

Subform Reference to Control Rather than Field

Tab Page Reference

Shortcut Keys


Combo Box Top Tips

Properties and Validation

Select First Item

Cascading Combo Boxes

Zip, City, State AutoFill

Report Design

Suppressing Page Headers and Footers on the First Page of Your Report

Add the NoData Event

Annual Monthly Crosstab Columns

Design Environment

Adding Buttons to the Quick Access Toolbar

Collapsing the Office Ribbon for more space

VBA Programming

Using Nz() to Handle Nulls

Avoiding Exits in the Body of a Procedure

Shortcut Debugging Keys

Setting Module Options

Math Rounding Issues

Rename a File or Folder

Source Code Library

Microsoft Access Module VBA Library

Royalty-Free VBA Modules

VBA Error Handling

Error Handling and Debugging Techniques

Error Number and Description Reference

Basic Error Handling

Pinpointing the Error Line

Performance Tips

Linked Database

Subdatasheet Name

Visual Source Safe

Deployment

Runtime Downloads

Simulating Runtime

Prevent Close Box

Disable Design Changes

Broken References

Missing Package & Deployment Wizard

Terminal Services and RemoteApp Deployment

Avoid Program Files Folder

Microsoft Access Front-End Deployment

System Admin

Disaster Recovery Plan

Compact Database

Compact on Close

Database Corruption

Class Not Registered Run-time Error -2147221164

Inconsistent Compile Error

Decompile Database

Bad DLL Calling Convention

Error 3045: Could Not Use

Converting ACCDB to MDB

Cloud and Azure

Cloud Implications

MS Access and SQL Azure

Deploying MS Access Linked to SQL Azure

Visual Studio LightSwitch

LightSwitch Introduction

Comparison Matrix

Additional Resources

Microsoft Access Help

MS Access Developer Programming

More Microsoft Access Tips

Technical Papers

Microsoft Access Tools

Connect with Us

Email NewsletterEmail Newsletter Signup

FMS Development Team BlogDeveloper Team Blog

Facebook PageFacebook

Twitter with FMSTwitter

FMS Support SiteSupport Forum

 

 

Microsoft Access FormsMicrosoft Access Performance Tip for Forms: Use Late Binding for Subforms on Tab Pages

Provided by: FMS Development Team

The Microsoft Access tab controls makes it easy to show a different subform on each tab page. Unfortunately, it you add too many, the form may take a long time to open. This is because it's loading all the data in each of the subforms even though only page 1 is shown.

To speed up your MS Access form, you can design it with the subforms on page 2 and beyond remain unbound until the user clicks on its page.

This on-demand technique allows the main form to load without trying to populate all of the subforms.

This sample VBA code is for a tab control named tabStuff. We refer to the page by name rather than number because you may reorder or add/delete tabs over time:

Private Sub tabStuff_Change()

  Select Case tabStuff.Pages.item(tabStuff.Value).Name

    Case "pg1"
      ' Where sfrm1 is the name of the subform on page 1
      If Len(sfrm1.SourceObject) = 0 Then
        sfrm1.SourceObject = "frmStuff_1"
        sfrm1.LinkChildFields = "StuffID"
      End If

    Case "pg2"
      ' Where sfrm2 is the name of the subform on page 2
      If Len(sfrm2.SourceObject) = 0 Then
        sfrm2.SourceObject = "frmStuff_2"
        sfrm2.LinkChildFields = "StuffID"
      End If

    ' Repeat for each tab page

  End Select

End Sub

Additional Resources

Feedback

Contact Us  l   Web questions: Webmaster   l   Copyright FMS, Inc., Vienna, Virginia
Celebrating our 28th Year of Software Excellence