Microsoft KB Archive/186682

= FIX: DBCombo BoundText Incorrect When Setting Text Property =

Article ID: 186682

Article Last Modified on 11/18/2003

-

APPLIES TO


 * Microsoft Visual Basic 5.0 Professional Edition
 * Microsoft Visual Basic 5.0 Enterprise Edition
 * Microsoft Visual Studio 97 Service Pack 3

-



This article was previously published under Q186682



SYMPTOMS
When setting the DBCombo Text property to a new value that exists in the database, the BoundText property is not updated to hold the contents of the BoundColumn for the record.



STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug has been fixed in Visual Basic 6.0 with the Microsoft Bound Data List Controls 6.0.



MORE INFORMATION
The DBLIST32.OCX control that ships with Visual Basic 4.0 returned the BoundText properly in this situation. It is possible that the Visual Basic 5.0 version of DBLIST32.OCX could break an application built with Visual Basic 4.0 when the DBLIST32.OCX control is upgraded.

Steps to Reproduce Behavior
These steps use the BIBLIO.MDB sample database that ships with Visual Basic.

 Start a new Standard EXE Project in Visual Basic. Form1 is created by default. Place a data control (Data1) on Form1. Set the DataBaseName property to BIBLIO.MDB. Set the RecordsSource to the Authors table. From the Project menu, choose Components. Add the "Microsoft Data Bound List Controls" to the project. Add a DBCombo control (DBCombo1) to the form. Set the RowSource property to Data1. Set the BoundColumn to AU_ID. Set the ListField to Author.  Add a CommandButton (Command1) to Form1. Add the following code to the Click event of Command1: Private Sub Command1_Click DBCombo1.Text = "Curry, Dave" MsgBox DBCombo1.BoundText End Sub

 Save and run the project.</li> Click the CommandButton and note that a blank message box pops up. It should have popped up with the AU_ID corresponding to the Author "Curry, Dave."</li></ol>

Additional query words: kbCtrl kbVBp500 kbVBp400bug kbVBp500bug kbVS97sp1 kbVS97sp2 kbVS97sp3 kbDSupport kbdss vb6fix

Keywords: kbbug kbfix kbgrpdsvb KB186682

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.