DataSource Property Unavailable for Bound Controls

Last reviewed: December 15, 1997
Article ID: Q164924
The information in this article applies to:
  • Microsoft Visual Basic for Applications included with: - Microsoft Word 97 for Windows - Microsoft PowerPoint 97 for Windows - Microsoft Excel 97 for Windows

SYMPTOMS

When you add a data-aware (bound) control to a UserForm, the DataSource property is not available to link the bound control to a Data control.

CAUSE

This behavior occurs when you use any of the following controls:

   DBGrid
   DBListBox
   DBCombo
   MSFlexGrid

WORKAROUND

You must use the DataSource property to bind a data source to a control. Because the DataSource property is not an available property, you cannot bind the control to a data source. To workaround this problem, use Visual Basic for Applications commands to populate the controls that are listed in this article. For additional information, please see the following articles in the Microsoft Knowledge Base:

   ARTICLE-ID: Q164922
   TITLE     : How to Fill the Microsoft Visual Basic 5.0 FlexGrid Control

   ARTICLE-ID: Q164923
   TITLE     : How to Fill a UserForm ListBox with Database Values

STATUS

Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

When you install the Enterprise Edition of Visual Basic version 5.0, the Microsoft RemoteData control, version 2.0, becomes an additional control that you can add to the list of available controls for the Visual Basic for Applications control Toolbox.

Without a RemoteData control, a Data control or equivalent data-aware controls on a form cannot automatically access data. The RemoteData and Data controls are examples of DataSource controls. You can perform most remote data access operations using the DataSource controls without writing any code at all. Data-aware controls that are bound to a DataSource control automatically display data from one or more columns for the current row or, in some cases, for a set of rows on either side of the current row.

To bind a data-aware (bound) control to a field in a database at run time, you use the Properties window to specify a Data control in the DataSource property at design time.

NOTE: The DataSource property setting is not available at run time.


Additional query words: vb vbe vba word8 word97 8.00 8.0 kbwordvba xlvbainfo
Keywords : kbprg
Version : 97
Platform : WINDOWS
Issue type : kbprb
Solution Type : kbworkaround


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: December 15, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.