BUG: Cell Data Disappears in DBGrid with NumberFormat Set (137037)
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 Q137037 SYMPTOMS
Setting the NumberFormat property for a column in a DBGrid control to
'general number' or 'fixed' sometimes causes all cell data to disappear.
RESOLUTION
At design time, right-click the DBGrid control, and click Retrieve Fields
to set the column headers automatically to information from the bound data
control. Then reset any NumberFormat properties you have modified.
This will fix the problem permanently for this DBGrid control. However, you
can't use this solution if the DatabaseName and RecordSource properties of
the data control are not known until run time. In this case, set the
NumberFormat property of each relevant column in code. This can be done
immediately after the data control is connected to the database by using
code similar to this:
Data1.DatabaseName = "C:\Access\Number.mdb"
Data1.RecordSource = "Numbers"
Data1.Refresh
DBGrid.Columns(0).NumberFormat = "fixed"
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 KB137037 |
---|
|