DOCUMENT:Q186682 02-JUN-1998 [vbwin] TITLE :BUG: DBCombo BoundText Incorrect When Setting Text Property PRODUCT :Microsoft Visual Basic for Windows PROD/VER:WINDOWS:5.0,97,97sp1,97sp2,97sp3 OPER/SYS:WINDOWS KEYWORDS: ====================================================================== --------------------------------------------------------------------- The information in this article applies to: - Microsoft Visual Basic Professional and Enterprise Editions for Windows, version 5.0 - Microsoft Visual Studio versions 97, 97sp1, 97sp2, 97sp3 --------------------------------------------------------------------- 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. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available. 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. 1. Start a new Standard EXE Project in Visual Basic. Form1 is created by default. 2. Place a data control (Data1) on Form1. Set the DataBaseName property to BIBLIO.MDB. Set the RecordsSource to the Authors table. 3. From the Project menu, choose Components. Add the "Microsoft Data Bound List Controls" to the project. 4. 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. 5. 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 6. Save and run the project. 7. 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." Additional query words: kbCtrl kbVBp500 kbVBp400 kbVBp500bug kbVS97sp1bug kbVS97sp2bug kbVS97sp3bug kbDSupport kbdss ====================================================================== Version : WINDOWS:5.0,97,97sp1,97sp2,97sp3 Platform : WINDOWS Issue type : kbbug ============================================================================= THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY. Copyright Microsoft Corporation 1998.