PRB: Combo Box Moves Record Pointer When No Selection Was MadeID: Q145891 3.00 3.00b WINDOWS kbtool kbprb The information in this article applies to:
SYMPTOMSWhen a form contains a combo box that has its RowSource set to the same table that other controls on the form are using as their ControlSource, the record pointer may move to a different record when the user activates the combo box. There are two different scenarios where this unwanted moving of the record pointer can occur. This article outlines both scenarios.
WORKAROUNDUse an SQL statement for the RowSource of the combo box.
STATUSMicrosoft is researching this behavior and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATIONIf you are not familiar with the Form Designer or with the different form controls, please see Chapters 9 and 11 in the Developer's Guide.
Steps to Reproduce Behavior1. Create a new form and add the Customer table (found in the Samples\Data 2. Drag the cust_id and company fields from the Customer table in the Data
3. Add a combo box (Combo1) to the form and set these properties:
4. Add the following code to the following indicated Combo1 events:
5. Add a second combo box (Combo2) to the form and set these properties:
6. Add the following code to the following indicated Combo2 events:
7. Save and run the form.
8. After the form is up and running, click Debug on the Tools Menu. In the
Scenario Number OneActivate the drop down list in Combo1, and select BERGS. Look in the Debug window to see what record number you are on. Then click in the text area of Combo2 to place your mouse pointer in it. Look in the Debug window, and you will see that the record number has changed. Now place your mouse pointer back in Combo1, and you will see in the Debug window that the record number has moved back to what it was when you first made the selection in Combo1.
Scenario Number TwoActivate the drop down list in Combo1, and move your mouse pointer down the list until the last item in the visible list is highlighted. Without making a selection, click in one of the text boxes on the form. Look in the Debug Window, and you will see that the record pointer has moved. In both scenarios, if you were to activate one of the text boxes, you would see the value of the text box change to match what is stored in the record. Additional reference words: 3.00 3.00b VFoxWin KBCategory: kbtool kbprb KBSubcategory: FxtoolFormdes
|
Last Reviewed: February 16, 1996 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |