ACC97: "Property Cannot Be Set" Error Using Rich Text Control (199722)



The information in this article applies to:

  • Microsoft Access 97
  • Microsoft Office 97 Developer Edition

This article was previously published under Q199722
Moderate: Requires basic macro, coding, and interoperability skills.

SYMPTOMS

When you use a bound rich text box ActiveX control in a report and try to preview the report, you may receive the following error message:
Property cannot be set.
However, you can still preview and print the report.

CAUSE

Microsoft Access is trying to paint the control before a Windows handle for the report is created.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. This bug was corrected in Visual Studio 6.0 Service Pack 5.

For additional information about Visual Studio service packs, click the following article numbers to view the articles in the Microsoft Knowledge Base:

194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why

194295 HOWTO: Tell That a Visual Studio Service Pack Is Installed

To download the latest Visual Studio service pack, visit the following Microsoft Web site:

MORE INFORMATION

Steps to Reproduce Behavior

  1. Open the sample database Northwind.mdb.
  2. Create a new report based on the Employees table and open it in Design view.
  3. If the field list is not displayed, click Field List on the View menu.
  4. Drag the following field names from the field list to the detail section of the report:
       EmployeeID
       LastName
       FirstName
    					
  5. On the Insert menu, click ActiveX control, and then click Microsoft Rich Text Box control, version 6.0.
  6. Right-click the rich text box control, and then click Properties on the shortcut menu.
  7. Set the ControlSource property of the rich text box control to Notes.
  8. On the File menu, click Print Preview.
Note that you receive the error mentioned in the "Symptoms" section for each rich text box control on the report.

Modification Type:MinorLast Reviewed:12/12/2005
Keywords:kbbug kberrmsg kbfix kbVS600sp4fix KB199722 kbAudDeveloper