BUG:Text & Value Properties of DBGrid Column Show Empty String (139970)
The information in this article applies to:
- Microsoft Visual Basic Standard Edition, 32-bit, for Windows 4.0
- Microsoft Visual Basic Professional Edition, 16-bit, for Windows 4.0
- Microsoft Visual Basic Professional Edition, 32-bit, for Windows 4.0
- Microsoft Visual Basic Enterprise Edition, 16-bit, for Windows 4.0
- Microsoft Visual Basic Enterprise Edition, 32-bit, for Windows 4.0
This article was previously published under Q139970 SYMPTOMS
When using the DBGrid control, attempting to access the Text or Value
properties of columns that are not visible on the screen returns an
empty string regardless of the actual data in the column.
WORKAROUND
To work around this problem, reference the data directly from the
data control instead of from the grid control. For example, instead of
using
Print DBGrid1.Columns("Telephone").Text
to print out the contents of the current record's Telephone field, use
Print Data1.Recordset("Telephone")
This code prints the Telephone field regardless of whether or not the
Telephone column is visible on the screen.
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products
listed at the beginning of this article. We are researching this
problem and will post new information here in the Microsoft Knowledge
Base as it becomes available.
Modification Type: | Major | Last Reviewed: | 12/9/2003 |
---|
Keywords: | kbbug KB139970 |
---|
|