Microsoft KB Archive/824165

= ActiveX control that is contained in an Access form does not appear when the design-time license is not available =

Article ID: 824165

Article Last Modified on 4/3/2007

-

APPLIES TO


 * Microsoft Office Access 2007
 * Microsoft Office Access 2003
 * Microsoft Access 2002 Standard Edition

-





This article applies to a Microsoft Access database (.mdb) file or to a Microsoft Access database (.accdb) file.

Novice: Requires knowledge of the user interface on single-user computers.



SYMPTOMS
In an Access database, a form may have a licensed MFC ActiveX control. Additionally, the form may also have another control such as a text box that is bound to a field of a linked table. If you open this form in Form view, the MFC ActiveX control may not appear. This problem occurs when the design-time license option for the MFC ActiveX control is not available on the same computer where the form resides.

Note If you add an MFC ActiveX control to your form, and the MFC ActiveX control is licensed with a design-time license. The availability of the design-time license on the same computer where the form resides is not required unless the form is opened in Design view.



CAUSE
This problem occurs when Access tries to open the form in Design view to make name changes when Perform name AutoCorrect is enabled for the database that contains the form. Because the design-time license is not available on the computer, Access unregisters the MFC ActiveX control. Therefore, the MFC ActiveX control does not appear.



WORKAROUND
To work around this problem, disable Track name AutoCorrect info for the database or disable Perform name AutoCorrect for the database before you register the MFC ActiveX control on the computer. To do this, follow these steps:
 * 1) Start Access.
 * 2) Open the database that contains the form with the MFC ActiveX control.
 * 3) On the Tools menu, click Options.

Note In Access 2007, click the Microsoft Office Button, and then click Current Database.
 * 1) In the Options dialog box, click the General tab, and then click to clear the Perform name AutoCorrect check box.

Notes
 * 1) * In Access 2007, click to clear the Perform name AutoCorrect check box under Name AutoCorrect Options.
 * 2) * You may also click to clear the Track name AutoCorrect info check box for the database. When you click to clear the Track name AutoCorrect info check box, the Perform name AutoCorrect option is unavailable.
 * 3) Close the database.
 * 4) Exit Access.
 * 5) Move to the command prompt, and then run regsvr32.

When you run this command, this registers the MFC ActiveX control (.ocx file).
 * 1) Open the form in Form view.

The MFC ActiveX control appears in the form.



MORE INFORMATION
When you enable Track name AutoCorrect info for the database, Access creates a name map for each object in the database. The name map is used to track name changes. If Perform name AutoCorrect option is also made available, Access verifies that the required name change is applied to the object or to its contents each time that the object is opened. If a change has occurred, the name changes are made automatically.

The problem occurs when you move the database that contains the form to another computer, together with the MFC ActiveX control file (.ocx), and then you re-link the table that is referred to by the control (such as text box) in the form. When you re-link the table, this activates Track Name AutoCorrect info for the form. When you open the form in Form view, Access tries to perform the name correction automatically by opening the form in Design view. This fails because the design-time license for the MFC ActiveX control does not exist. Therefore, the MFC ActiveX control does not appear on the form.

This problem does not occur if the form does not contain any references to linked tables.

Additional query words: ACC2002 ACC2003 ACC2007

Keywords: kbtshoot kbexpertiseinter kbprogramming kbforms kbdisplay kblicensing kbprb KB824165

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.