ACC97: ActiveX ControlSource Property Not Copied Correctly

Last reviewed: February 2, 1998
Article ID: Q180275
The information in this article applies to:
  • Microsoft Access 97

SYMPTOMS

Moderate: Requires basic macro, coding, and interoperability skills.

When you make a copy of a form that contains an ActiveX control, if the ControlSource property of that ActiveX control contains an expression or the name of an underlying field, the ControlSource property of the control in the new instance of the form will be blank.

RESOLUTION

Reset the ControlSource Property in each of the ActiveX controls on the new instance of the form.

STATUS

Microsoft has confirmed this to be a problem in Microsoft Access 97. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Start Microsoft Access and open the sample database Northwind.mdb.

  2. In the Database Window, click Forms, and then click New.

  3. Create a form based on the Employees table in Design View.

  4. If the field list is not already visible, click Field List on the View menu. Drag the FirstName and LastName fields from the field list to the Detail section of the form.

  5. On the Insert menu, click Insert ActiveX Control.

  6. In the Insert ActiveX Control dialog box, select Calendar Control 8.0, and then click OK.

  7. Right-click the Calendar Control, and then click Properties.

  8. Click the ControlSource property box, and then click the drop-down arrow. Select BirthDate from the list.

  9. Save the form as frmTest.

  10. On the View menu, click Form View.

  11. Use the Record Navigation buttons to move from record to record, and note that the date displayed in the Calendar Control changes. Close the form.

  12. Select the frmTest form in the Database Window, and on the Edit menu, click Copy.

  13. On the Edit menu, click Paste. In the Paste As dialog box, type "frmTestCopy" (without the quotation marks) in the Form Name box, and then click OK.

  14. Open the frmTestCopy form in Form view and use the Record Navigation buttons to move from record to record. Note that the date displayed in the Calendar Control does not change.

  15. On the View menu, click Design view.

  16. Right-click the Calendar Control, and then click Properties. Note that the Control Source property is blank.


Additional query words: pra null custom ole
Keywords : IntpCstm
Technology : kbole
Version : WINDOWS:97
Platform : WINDOWS
Hardware : x86
Issue type : kbbug
Solution Type : kbpending


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 2, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.