PRB: Negative Numbers Do Not Display in a Combo Box (190267)



The information in this article applies to:

  • 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 Q190267

SYMPTOMS

If a combo box has the RowSourceType set to SQL Statement and the BoundTo property is set to true, negative numeric values do not display in the combo box.

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

If the RowSourceType property is set to any other value, negative numbers will display in the combo box. Also, if the BoundTo property is set to false, negative numbers will display in the combo box, but the positive value of that number is written to the table.

Steps to Reproduce Behavior

  1. Save the following code to a program file and run it to create a table named "test" with a numeric field called "numfld".
          CREATE TABLE test (numfld N(3))
          INSERT INTO test (numfld) VALUES (1)
          INSERT INTO test (numfld) VALUES (2)
          INSERT INTO test (numfld) VALUES (-1)
          INSERT INTO test (numfld) VALUES (-2)
  2. Create a form, add the table to the Data Environment, and add a combo box to the form.
  3. Change the following properties of the combo box:
          BoundTo = .T.
          ControlSource = numfld
          RowSource = SELECT * FROM test INTO CURSOR mytest
          RowSourceType = SQL Statement
  4. Run the form and select a negative number from the drop-down combo box. Note that once a negative number is selected, it does not display in the combo box.

Modification Type:MajorLast Reviewed:12/11/1999
Keywords:kbprb KB190267 kbAudDeveloper