ACC2000: The Keyboard Does Not Respond When an ActiveX Control Has Focus (210608)



The information in this article applies to:

  • Microsoft Access 2000

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

This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).

SYMPTOMS

You are unable to type data into a text box or combo box on a tab control that contains a Microsoft TreeView or ListView ActiveX control on another page.

This behavior occurs when all of the following conditions are true:

  • The Microsoft TreeView or ListView ActiveX control is on a subform.
  • The subform is on a tab control.
  • The subform is on a different page of the tab control than the one with the text box or combo box.
  • You clicked the TreeView ActiveX control to give it focus before switching pages on the tab control.
NOTE: You can set the value of the text box or combo box with a macro or with Visual Basic for Applications code.

CAUSE

The Microsoft TreeView or ListView ActiveX control still has the focus. Even though another page on the tab control has been selected, and you have clicked the text box or combo box control, the ActiveX control retains focus.

RESOLUTION

To work around this problem, use any of the following methods.

Method 1

Place the Microsoft TreeView or ListView ActiveX control directly onto the tab control, instead of placing it onto a subform first.

Method 2

If the TreeView or ListView ActiveX control must be on a subform, remove the focus by clicking another non-ActiveX control on the same page as the TreeView or ListView ActiveX control.

Method 3

Close and reopen the form, and then go directly to the text box or combo box that you want without clicking on the TreeView or ListView ActiveX control.

STATUS

Microsoft has confirmed that this is a problem in Microsoft Access 2000.

MORE INFORMATION

Steps to Reproduce Problem

  1. Start Microsoft Access and create a new database.
  2. In the Database window, click Forms, and then click New to create a new form.
  3. On the Insert menu, click ActiveX Control.
  4. In the ActiveX Control dialog box, select Microsoft TreeView Control (either version), and then click OK.
  5. Create an unbound text box on the form.
  6. Close and save the form as TreeViewTest.
  7. Repeat step 2 to create another new form.
  8. Create a tab control on the form.
  9. Click Page1 on the tab control, and then create two unbound text boxes on this page.
  10. Click Page2 on the tab control.
  11. Switch to the Database window. Select the TreeViewTest form, and then drag it onto Page 2 of the tab control.
  12. On the View menu, click Form View.
  13. Click Page2, and then click the TreeView ActiveX control.
  14. Click Page1.
Note that you are unable to type any data into the text boxes. However, if you click Page2, and then click the text box on this page to move the focus away from the TreeView ActiveX control, you can return to Page 1 and type data into the text boxes.

REFERENCES

For more information about creating a tab control, click Microsoft Access Help on the Help menu, type create a form with multiple pages or tabs in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

Modification Type:MajorLast Reviewed:6/24/2004
Keywords:kbbug kbpending kbusage KB210608