Microsoft KB Archive/142838

= PRB: DBList BoundText Property Ignored with Table Type =

Article ID: 142838

Article Last Modified on 5/7/2003

-

APPLIES TO


 * Microsoft Visual Basic 5.0 Learning Edition
 * Microsoft Visual Basic 6.0 Learning Edition
 * Microsoft Visual Basic 5.0 Professional Edition
 * Microsoft Visual Basic 6.0 Professional Edition
 * Microsoft Visual Basic 5.0 Enterprise Edition
 * Microsoft Visual Basic 6.0 Enterprise Edition
 * Microsoft Visual Basic 4.0 Standard Edition
 * Microsoft Visual Basic 4.0 Professional Edition
 * Microsoft Visual Basic 4.0 Professional Edition
 * Microsoft Visual Basic 4.0 16-bit Enterprise Edition
 * Microsoft Visual Basic 4.0 32-Bit Enterprise Edition

-



This article was previously published under Q142838



SUMMARY
When setting a reference to the BoundText property of a bound DBList control, the value is ignored if the RecordsetType property is set to '0 - Table'.



RESOLUTION
The DBList control utilizes the FindFirst method of a data control. The FindFirst method does not work against a table type recordset. The dynaset type does not exhibit these traits, and therefore, can be used as a work around for this problem.



STATUS
Microsoft has confirmed this to be a problem in Visual Basic version 4.0. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.



Steps to Reproduce
 Start Visual Basic, or select New Project from the File menu if it is already running. Form1 is created by default. Add a single data control to Form1.  Change these properties of Data1: DatabaseName:     BIBLIO.MDB RecordSource:     Authors RecordsetType:     0 - Table  Add a single DBList control to the form.  Change these properties of DBList1: RowSource:     Data1 ListField:     Au_ID   In the reposition event of the Data control add this code: Private Sub Data1_Reposition DBList1.BoundText = Data1.Recordset.Fields(0) End Sub </li> Run the project and change to different records in the database via the data control VCR controls. You will note that there is no change in the list while moving through the records. If the recordset type is changed to Dynaset the DBList will behave as expected.</li></ol>

Additional query words: kbVBp400 kbVBp500 kbVBp600 KBDSE kbDSupport kbVBp kbControl

Keywords: kbprb KB142838

-

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

© Microsoft Corporation. All rights reserved.