Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

formating datagrid not working

Status
Not open for further replies.

jozino01

Technical User
Apr 25, 2003
257
CA
hi,
i have the following code (vb 6.0, sp6, windows xp home, sp2):

DataGrid1.ClearFields
sSQL = "Select [boom], [volume], [total] From Logs_Inventory;"
Set RSTALL = New ADODB.Recordset
RSTALL.Open sSQL, objAccessConnection, adOpenKeyset, adLockOptimistic
Set DataGrid1.DataSource = RSTALL
DataGrid1.Columns(1).DataFormat.Format = "#,##0.000"
DataGrid1.Columns(2).DataFormat.Format = "#,##0.00"
DataGrid1.Columns(1).Alignment = dbgRight
DataGrid1.Columns(2).Alignment = dbgRight

it works - it displays data in datagrid, but all three columns are align to the left numbers are not formated at all.
i just don't see what's wrong...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top