Microsoft KB Archive/161762

= PRB: NumberFormat Property of DBGrid Does Not Change Format =

Article ID: 161762

Article Last Modified on 6/24/2004

-

APPLIES TO


 * Microsoft Visual Basic 4.0 Standard Edition
 * Microsoft Visual Basic 4.0 Professional Edition
 * Microsoft Visual Basic 4.0 Professional Edition
 * Microsoft Visual Basic 4.0 16-bit Enterprise Edition
 * Microsoft Visual Basic 4.0 32-Bit Enterprise Edition

-



This article was previously published under Q161762



SYMPTOMS
When you set the NumberFormat Property through the Property page of the DBGrid control, it does not affect the column displayed in the control.



STATUS
Microsoft has confirmed this to be an issue in the Microsoft products listed at the beginning of this article. Microsoft is researching this issue and will post new information here in the Microsoft Knowledge Base as it becomes available.



Steps to Reproduce Behavior
 Start 16-bit or 32-bit Visual Basic 4.0, or if it is already running, click New Project on the File menu.  Add a data control and a DBGrid Control to the Form1 form. Set the controls to the following properties:   Control         Default Name        Property            Setting ---  Data              Data1            DatabaseName        Biblio.mdb RecordSource       Titles

DBGrid           DBGrid1          DataSource          Data1  Right-click the DBGrid control and click Retrieve Fields. Note that the column headers are now set to field names from the Titles table. Right-click the DBGrid control and click Properties to open the Properties page. Click the Columns Tab and choose Column1 (Year Published) in the Column list box. In the Number Format Combo box, enter ##. The "Year Published" field is of type Integer in the database. Click OK to close the Properties page. On the Run menu, click Start or press the F5 key to start the program. The Year Published column still appears with four instead of two digits.</ol>

Additional query words: 4.00 kbdsd vb4win vb4all pound sign format numerical

Keywords: kbprb KB161762

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.