PRB: DBList BoundText Property Ignored with Table Type

Last reviewed: January 26, 1996
Article ID: Q142838
The information in this article applies to:
  • Standard, Professional, and Enterprise Editions of Microsoft Visual Basic, 16-bit and 32-bit, for Windows, version 4.0

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'.

WORKAROUND

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.

MORE INFORMATION

Steps to Reproduce

  1. Start Visual Basic, or select New Project from the File menu if it is already running. Form1 is created by default.

  2. Add a single data control to Form1.

  3. Change these properties of Data1:

       DatabaseName:      BIBLIO.MDB
       RecordSource:      Authors
       RecordsetType:      0 - Table
    
    

  4. Add a single DBList control to the form.

  5. Change these properties of DBList1:

       RowSource:      Data1
       ListField:      Au_ID
    
    

  6. In the reposition event of the Data control add this code:

       Private Sub Data1_Reposition()
           DBList1.BoundText = Data1.Recordset.Fields(0)
       End Sub
    
    

  7. 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.


Additional reference words: 4.00 vb4win vb4all
KBCategory: kbusage
KBSubcategory: PrgCtrlsCus


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.

Last reviewed: January 26, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.