You can use the FeatureInstall property to specify or determine how Microsoft Access handles calls to methods and properties that require features not yet installed.
Setting
The FeatureInstall property uses one of the following msoFeatureInstall constants.
Constant | Value | Description |
---|---|---|
msoFeatureInstallNone | 0 | (Default) An Automation error occurs at run time when uninstalled features are called. |
msoFeatureInstallOnDemand | 1 | The user is prompted to install new features. |
msoFeatureInstallOnDemandWithUI | 2 | The feature is installed automatically and a progress meter is displayed during installation. The user isn't prompted to install new features. |
Remarks
When VBA code references an object that is not installed the Microsoft Installer technology will attempt to install the required feature. You use the FeatureInstall property to control what happens when an uninstalled object is referenced. When this property is set to the default, any attempt to use an uninstalled object causes the Installer technology to try to install the requested feature. In some circumstances this may take some time, and the user may believe that the machine has stopped responding to additional commands.
You can set the FeatureInstall property to msoFeatureInstallOnDemandWithUI so users can see that something is happening as the feature is being installed. You can set the FeatureInstall property to msoFeatureInstallNone if you want to trap the error that is returned and display your own dialog box to the user or take some other custom action.
If you have the UserControl property set to False, users will not be prompted to install new features even if the FeatureInstall property is set to msoFeatureInstallOnDemand. If the UserControl property is set to True, an installation progress meter will appear if the FeatureInstall property is set to msoFeatureInstallOnDemand.