PRB: DBList BoundText Property Ignored with Table Type
ID: Q142838
|
The information in this article applies to:
-
Microsoft Visual Basic Learning, Professional, and Enterprise Editions for Windows, versions 5.0, 6.0
-
Microsoft Visual Basic Standard, Professional, and Enterprise Editions, 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'.
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.
MORE INFORMATION
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
- 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 query words:
kbVBp400 kbVBp500 kbVBp600 KBDSE kbDSupport kbVBp kbControl
Keywords : kbGrpVBDB
Version :
Platform : NT WINDOWS
Issue type :