BUG: Valid Method Does Not Fire in Combo Box (149608)



The information in this article applies to:

  • Microsoft Visual FoxPro for Windows 3.0
  • Microsoft Visual FoxPro for Windows 3.0b
  • Microsoft Visual FoxPro for Windows 5.0
  • Microsoft Visual FoxPro for Windows 5.0a
  • Microsoft Visual FoxPro for Windows 6.0

This article was previously published under Q149608

SYMPTOMS

The Valid method code of a combo box does not fire when the Style property is set to 2 - Dropdown List.

WORKAROUND

Set the Style property of the combo box to 0 - Dropdown Combo.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Setting the Style property to 0 - Dropdown Combo is not always the best interface solution. Certain style features of the Dropdown List do not exist in the Dropdown Combo style. One major difference between these two styles is that the Dropdown List is read-only while the Dropdown Combo allows the user to type in the text area and possibly add new entries to the list. For the read-only feature, use the KeyPress event to trap for keys being pressed while the combo box object has the focus.

Steps to Reproduce Problem

  1. Create a new form. Add a combo box and text box. Change the Style property of the combo box to 2 - Dropdown List. Place a WAIT WINDOW command in the combo box Valid method.
  2. Save changes to the form, and run the form. Make sure the tab order is set so the combo box is the first object. Press the TAB key to move out of the combo box to the next field. Notice the Valid method of the combo box does not fire.

Modification Type:MajorLast Reviewed:5/12/2003
Keywords:kbBug kbProgramming KB149608