ACC97: ActiveX Control's ControlSource Property Not Copied Correctly

ID: Q180275


The information in this article applies to:


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.


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 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 
Version           : WINDOWS:97
Platform          : WINDOWS 
Issue type        : kbbug 

Last Reviewed: April 26, 1999